Data Structures | Defines | Typedefs | Functions | Variables

ext/dl/dl.h File Reference

#include <ruby.h>
Include dependency graph for dl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  s_voidp
struct  s_short
struct  s_int
struct  s_long
struct  s_float
struct  s_double
struct  dl_handle
struct  cfunc_data
struct  ptr_data

Defines

#define FUNC_CDECL(x)   x
#define MAX_CALLBACK   5
#define DLSTACK_TYPE   SIGNED_VALUE
#define DLSTACK_SIZE   (20)
#define DLSTACK_PROTO
#define DLSTACK_ARGS(stack)
#define DLSTACK_PROTO0_   void
#define DLSTACK_PROTO1_   DLSTACK_TYPE
#define DLSTACK_PROTO2_   DLSTACK_PROTO1_, DLSTACK_TYPE
#define DLSTACK_PROTO3_   DLSTACK_PROTO2_, DLSTACK_TYPE
#define DLSTACK_PROTO4_   DLSTACK_PROTO3_, DLSTACK_TYPE
#define DLSTACK_PROTO4_   DLSTACK_PROTO3_, DLSTACK_TYPE
#define DLSTACK_PROTO5_   DLSTACK_PROTO4_, DLSTACK_TYPE
#define DLSTACK_PROTO6_   DLSTACK_PROTO5_, DLSTACK_TYPE
#define DLSTACK_PROTO7_   DLSTACK_PROTO6_, DLSTACK_TYPE
#define DLSTACK_PROTO8_   DLSTACK_PROTO7_, DLSTACK_TYPE
#define DLSTACK_PROTO9_   DLSTACK_PROTO8_, DLSTACK_TYPE
#define DLSTACK_PROTO10_   DLSTACK_PROTO9_, DLSTACK_TYPE
#define DLSTACK_PROTO11_   DLSTACK_PROTO10_, DLSTACK_TYPE
#define DLSTACK_PROTO12_   DLSTACK_PROTO11_, DLSTACK_TYPE
#define DLSTACK_PROTO13_   DLSTACK_PROTO12_, DLSTACK_TYPE
#define DLSTACK_PROTO14_   DLSTACK_PROTO13_, DLSTACK_TYPE
#define DLSTACK_PROTO14_   DLSTACK_PROTO13_, DLSTACK_TYPE
#define DLSTACK_PROTO15_   DLSTACK_PROTO14_, DLSTACK_TYPE
#define DLSTACK_PROTO16_   DLSTACK_PROTO15_, DLSTACK_TYPE
#define DLSTACK_PROTO17_   DLSTACK_PROTO16_, DLSTACK_TYPE
#define DLSTACK_PROTO18_   DLSTACK_PROTO17_, DLSTACK_TYPE
#define DLSTACK_PROTO19_   DLSTACK_PROTO18_, DLSTACK_TYPE
#define DLSTACK_PROTO20_   DLSTACK_PROTO19_, DLSTACK_TYPE
#define DLSTACK_PROTO0   void
#define DLSTACK_PROTO1   DLSTACK_PROTO1_, ...
#define DLSTACK_PROTO2   DLSTACK_PROTO2_, ...
#define DLSTACK_PROTO3   DLSTACK_PROTO3_, ...
#define DLSTACK_PROTO4   DLSTACK_PROTO4_, ...
#define DLSTACK_PROTO4   DLSTACK_PROTO4_, ...
#define DLSTACK_PROTO5   DLSTACK_PROTO5_, ...
#define DLSTACK_PROTO6   DLSTACK_PROTO6_, ...
#define DLSTACK_PROTO7   DLSTACK_PROTO7_, ...
#define DLSTACK_PROTO8   DLSTACK_PROTO8_, ...
#define DLSTACK_PROTO9   DLSTACK_PROTO9_, ...
#define DLSTACK_PROTO10   DLSTACK_PROTO10_, ...
#define DLSTACK_PROTO11   DLSTACK_PROTO11_, ...
#define DLSTACK_PROTO12   DLSTACK_PROTO12_, ...
#define DLSTACK_PROTO13   DLSTACK_PROTO13_, ...
#define DLSTACK_PROTO14   DLSTACK_PROTO14_, ...
#define DLSTACK_PROTO14   DLSTACK_PROTO14_, ...
#define DLSTACK_PROTO15   DLSTACK_PROTO15_, ...
#define DLSTACK_PROTO16   DLSTACK_PROTO16_, ...
#define DLSTACK_PROTO17   DLSTACK_PROTO17_, ...
#define DLSTACK_PROTO18   DLSTACK_PROTO18_, ...
#define DLSTACK_PROTO19   DLSTACK_PROTO19_, ...
#define DLSTACK_PROTO20   DLSTACK_PROTO20_, ...
#define DLSTACK_ARGS0(stack)
#define DLSTACK_ARGS1(stack)   stack[0]
#define DLSTACK_ARGS2(stack)   DLSTACK_ARGS1(stack), stack[1]
#define DLSTACK_ARGS3(stack)   DLSTACK_ARGS2(stack), stack[2]
#define DLSTACK_ARGS4(stack)   DLSTACK_ARGS3(stack), stack[3]
#define DLSTACK_ARGS5(stack)   DLSTACK_ARGS4(stack), stack[4]
#define DLSTACK_ARGS6(stack)   DLSTACK_ARGS5(stack), stack[5]
#define DLSTACK_ARGS7(stack)   DLSTACK_ARGS6(stack), stack[6]
#define DLSTACK_ARGS8(stack)   DLSTACK_ARGS7(stack), stack[7]
#define DLSTACK_ARGS9(stack)   DLSTACK_ARGS8(stack), stack[8]
#define DLSTACK_ARGS10(stack)   DLSTACK_ARGS9(stack), stack[9]
#define DLSTACK_ARGS11(stack)   DLSTACK_ARGS10(stack), stack[10]
#define DLSTACK_ARGS12(stack)   DLSTACK_ARGS11(stack), stack[11]
#define DLSTACK_ARGS13(stack)   DLSTACK_ARGS12(stack), stack[12]
#define DLSTACK_ARGS14(stack)   DLSTACK_ARGS13(stack), stack[13]
#define DLSTACK_ARGS15(stack)   DLSTACK_ARGS14(stack), stack[14]
#define DLSTACK_ARGS16(stack)   DLSTACK_ARGS15(stack), stack[15]
#define DLSTACK_ARGS17(stack)   DLSTACK_ARGS16(stack), stack[16]
#define DLSTACK_ARGS18(stack)   DLSTACK_ARGS17(stack), stack[17]
#define DLSTACK_ARGS19(stack)   DLSTACK_ARGS18(stack), stack[18]
#define DLSTACK_ARGS20(stack)   DLSTACK_ARGS19(stack), stack[19]
#define ALIGN_VOIDP   (sizeof(s_voidp) - sizeof(void *))
#define ALIGN_SHORT   (sizeof(s_short) - sizeof(short))
#define ALIGN_CHAR   (1)
#define ALIGN_INT   (sizeof(s_int) - sizeof(int))
#define ALIGN_LONG   (sizeof(s_long) - sizeof(long))
#define ALIGN_FLOAT   (sizeof(s_float) - sizeof(float))
#define ALIGN_DOUBLE   (sizeof(s_double) - sizeof(double))
#define DLALIGN(ptr, offset, align)
#define DLTYPE_VOID   0
#define DLTYPE_VOIDP   1
#define DLTYPE_CHAR   2
#define DLTYPE_SHORT   3
#define DLTYPE_INT   4
#define DLTYPE_LONG   5
#define DLTYPE_FLOAT   7
#define DLTYPE_DOUBLE   8
#define MAX_DLTYPE   9
#define PTR2NUM(x)   (ULONG2NUM((unsigned long)(x)))
#define NUM2PTR(x)   ((void*)(NUM2ULONG(x)))
#define BOOL2INT(x)   ((x == Qtrue)?1:0)
#define INT2BOOL(x)   (x?Qtrue:Qfalse)
#define CFUNC_CDECL   (rbdl_id_cdecl)
#define CFUNC_STDCALL   (rbdl_id_stdcall)
#define RDL_HANDLE(obj)   ((struct dl_handle *)(DATA_PTR(obj)))
#define RCFUNC_DATA(obj)   ((struct cfunc_data *)(DATA_PTR(obj)))
#define RPTR_DATA(obj)   ((struct ptr_data *)(DATA_PTR(obj)))

Typedefs

typedef void(* freefunc_t )(void *)

Functions

VALUE rb_dlcfunc_new (void(*func)(), int dltype, const char *name, ID calltype)
int rb_dlcfunc_kind_p (VALUE func)
VALUE rb_dlptr_new (void *ptr, long size, freefunc_t func)
VALUE rb_dlptr_new2 (VALUE klass, void *ptr, long size, freefunc_t func)
VALUE rb_dlptr_malloc (long size, freefunc_t func)

Variables

VALUE rb_mDL
VALUE rb_cDLHandle
VALUE rb_cDLSymbol
VALUE rb_eDLError
VALUE rb_eDLTypeError
ID rbdl_id_cdecl
ID rbdl_id_stdcall

Define Documentation

#define ALIGN_CHAR   (1)

Definition at line 149 of file dl.h.

Referenced by Init_dl().

#define ALIGN_DOUBLE   (sizeof(s_double) - sizeof(double))

Definition at line 156 of file dl.h.

Referenced by Init_dl().

#define ALIGN_FLOAT   (sizeof(s_float) - sizeof(float))

Definition at line 155 of file dl.h.

Referenced by Init_dl().

#define ALIGN_INT   (sizeof(s_int) - sizeof(int))

Definition at line 150 of file dl.h.

Referenced by Init_dl().

#define ALIGN_LONG   (sizeof(s_long) - sizeof(long))

Definition at line 151 of file dl.h.

Referenced by Init_dl().

#define ALIGN_SHORT   (sizeof(s_short) - sizeof(short))

Definition at line 148 of file dl.h.

Referenced by Init_dl().

#define ALIGN_VOIDP   (sizeof(s_voidp) - sizeof(void *))

Definition at line 147 of file dl.h.

Referenced by Init_dl().

#define BOOL2INT (   x  )     ((x == Qtrue)?1:0)

Definition at line 185 of file dl.h.

#define CFUNC_CDECL   (rbdl_id_cdecl)

Definition at line 205 of file dl.h.

Referenced by rb_dlcfunc_call(), rb_dlcfunc_initialize(), and rb_dlptr_free_get().

#define CFUNC_STDCALL   (rbdl_id_stdcall)

Definition at line 206 of file dl.h.

Referenced by rb_dlcfunc_call().

#define DLALIGN (   ptr,
  offset,
  align 
)
Value:
{\
  while( (((unsigned long)((char *)ptr + offset)) % align) != 0 ) offset++;\
}

Definition at line 158 of file dl.h.

#define DLSTACK_ARGS (   stack  ) 
Value:
stack[0],stack[1],stack[2],stack[3],stack[4],\
    stack[5],stack[6],stack[7],stack[8],stack[9],\
    stack[10],stack[11],stack[12],stack[13],stack[14],\
    stack[15],stack[16],stack[17],stack[18],stack[19]

Definition at line 42 of file dl.h.

#define DLSTACK_ARGS0 (   stack  ) 

Definition at line 109 of file dl.h.

#define DLSTACK_ARGS1 (   stack  )     stack[0]

Definition at line 110 of file dl.h.

#define DLSTACK_ARGS10 (   stack  )     DLSTACK_ARGS9(stack), stack[9]

Definition at line 119 of file dl.h.

#define DLSTACK_ARGS11 (   stack  )     DLSTACK_ARGS10(stack), stack[10]

Definition at line 120 of file dl.h.

#define DLSTACK_ARGS12 (   stack  )     DLSTACK_ARGS11(stack), stack[11]

Definition at line 121 of file dl.h.

#define DLSTACK_ARGS13 (   stack  )     DLSTACK_ARGS12(stack), stack[12]

Definition at line 122 of file dl.h.

#define DLSTACK_ARGS14 (   stack  )     DLSTACK_ARGS13(stack), stack[13]

Definition at line 123 of file dl.h.

#define DLSTACK_ARGS15 (   stack  )     DLSTACK_ARGS14(stack), stack[14]

Definition at line 124 of file dl.h.

#define DLSTACK_ARGS16 (   stack  )     DLSTACK_ARGS15(stack), stack[15]

Definition at line 125 of file dl.h.

#define DLSTACK_ARGS17 (   stack  )     DLSTACK_ARGS16(stack), stack[16]

Definition at line 126 of file dl.h.

#define DLSTACK_ARGS18 (   stack  )     DLSTACK_ARGS17(stack), stack[17]

Definition at line 127 of file dl.h.

#define DLSTACK_ARGS19 (   stack  )     DLSTACK_ARGS18(stack), stack[18]

Definition at line 128 of file dl.h.

#define DLSTACK_ARGS2 (   stack  )     DLSTACK_ARGS1(stack), stack[1]

Definition at line 111 of file dl.h.

#define DLSTACK_ARGS20 (   stack  )     DLSTACK_ARGS19(stack), stack[19]

Definition at line 129 of file dl.h.

#define DLSTACK_ARGS3 (   stack  )     DLSTACK_ARGS2(stack), stack[2]

Definition at line 112 of file dl.h.

#define DLSTACK_ARGS4 (   stack  )     DLSTACK_ARGS3(stack), stack[3]

Definition at line 113 of file dl.h.

#define DLSTACK_ARGS5 (   stack  )     DLSTACK_ARGS4(stack), stack[4]

Definition at line 114 of file dl.h.

#define DLSTACK_ARGS6 (   stack  )     DLSTACK_ARGS5(stack), stack[5]

Definition at line 115 of file dl.h.

#define DLSTACK_ARGS7 (   stack  )     DLSTACK_ARGS6(stack), stack[6]

Definition at line 116 of file dl.h.

#define DLSTACK_ARGS8 (   stack  )     DLSTACK_ARGS7(stack), stack[7]

Definition at line 117 of file dl.h.

#define DLSTACK_ARGS9 (   stack  )     DLSTACK_ARGS8(stack), stack[8]

Definition at line 118 of file dl.h.

#define DLSTACK_PROTO
Value:
DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,\
    DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,\
    DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,\
    DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE

Definition at line 37 of file dl.h.

#define DLSTACK_PROTO0   void

Definition at line 85 of file dl.h.

#define DLSTACK_PROTO0_   void

Definition at line 48 of file dl.h.

#define DLSTACK_PROTO1   DLSTACK_PROTO1_, ...

Definition at line 86 of file dl.h.

#define DLSTACK_PROTO10   DLSTACK_PROTO10_, ...

Definition at line 96 of file dl.h.

#define DLSTACK_PROTO10_   DLSTACK_PROTO9_, DLSTACK_TYPE

Definition at line 59 of file dl.h.

#define DLSTACK_PROTO11   DLSTACK_PROTO11_, ...

Definition at line 97 of file dl.h.

#define DLSTACK_PROTO11_   DLSTACK_PROTO10_, DLSTACK_TYPE

Definition at line 60 of file dl.h.

#define DLSTACK_PROTO12   DLSTACK_PROTO12_, ...

Definition at line 98 of file dl.h.

#define DLSTACK_PROTO12_   DLSTACK_PROTO11_, DLSTACK_TYPE

Definition at line 61 of file dl.h.

#define DLSTACK_PROTO13   DLSTACK_PROTO13_, ...

Definition at line 99 of file dl.h.

#define DLSTACK_PROTO13_   DLSTACK_PROTO12_, DLSTACK_TYPE

Definition at line 62 of file dl.h.

#define DLSTACK_PROTO14   DLSTACK_PROTO14_, ...

Definition at line 101 of file dl.h.

#define DLSTACK_PROTO14   DLSTACK_PROTO14_, ...

Definition at line 101 of file dl.h.

#define DLSTACK_PROTO14_   DLSTACK_PROTO13_, DLSTACK_TYPE

Definition at line 64 of file dl.h.

#define DLSTACK_PROTO14_   DLSTACK_PROTO13_, DLSTACK_TYPE

Definition at line 64 of file dl.h.

#define DLSTACK_PROTO15   DLSTACK_PROTO15_, ...

Definition at line 102 of file dl.h.

#define DLSTACK_PROTO15_   DLSTACK_PROTO14_, DLSTACK_TYPE

Definition at line 65 of file dl.h.

#define DLSTACK_PROTO16   DLSTACK_PROTO16_, ...

Definition at line 103 of file dl.h.

#define DLSTACK_PROTO16_   DLSTACK_PROTO15_, DLSTACK_TYPE

Definition at line 66 of file dl.h.

#define DLSTACK_PROTO17   DLSTACK_PROTO17_, ...

Definition at line 104 of file dl.h.

#define DLSTACK_PROTO17_   DLSTACK_PROTO16_, DLSTACK_TYPE

Definition at line 67 of file dl.h.

#define DLSTACK_PROTO18   DLSTACK_PROTO18_, ...

Definition at line 105 of file dl.h.

#define DLSTACK_PROTO18_   DLSTACK_PROTO17_, DLSTACK_TYPE

Definition at line 68 of file dl.h.

#define DLSTACK_PROTO19   DLSTACK_PROTO19_, ...

Definition at line 106 of file dl.h.

#define DLSTACK_PROTO19_   DLSTACK_PROTO18_, DLSTACK_TYPE

Definition at line 69 of file dl.h.

#define DLSTACK_PROTO1_   DLSTACK_TYPE

Definition at line 49 of file dl.h.

#define DLSTACK_PROTO2   DLSTACK_PROTO2_, ...

Definition at line 87 of file dl.h.

#define DLSTACK_PROTO20   DLSTACK_PROTO20_, ...

Definition at line 107 of file dl.h.

#define DLSTACK_PROTO20_   DLSTACK_PROTO19_, DLSTACK_TYPE

Definition at line 70 of file dl.h.

#define DLSTACK_PROTO2_   DLSTACK_PROTO1_, DLSTACK_TYPE

Definition at line 50 of file dl.h.

#define DLSTACK_PROTO3   DLSTACK_PROTO3_, ...

Definition at line 88 of file dl.h.

#define DLSTACK_PROTO3_   DLSTACK_PROTO2_, DLSTACK_TYPE

Definition at line 51 of file dl.h.

#define DLSTACK_PROTO4   DLSTACK_PROTO4_, ...

Definition at line 90 of file dl.h.

#define DLSTACK_PROTO4   DLSTACK_PROTO4_, ...

Definition at line 90 of file dl.h.

#define DLSTACK_PROTO4_   DLSTACK_PROTO3_, DLSTACK_TYPE

Definition at line 53 of file dl.h.

#define DLSTACK_PROTO4_   DLSTACK_PROTO3_, DLSTACK_TYPE

Definition at line 53 of file dl.h.

#define DLSTACK_PROTO5   DLSTACK_PROTO5_, ...

Definition at line 91 of file dl.h.

#define DLSTACK_PROTO5_   DLSTACK_PROTO4_, DLSTACK_TYPE

Definition at line 54 of file dl.h.

#define DLSTACK_PROTO6   DLSTACK_PROTO6_, ...

Definition at line 92 of file dl.h.

#define DLSTACK_PROTO6_   DLSTACK_PROTO5_, DLSTACK_TYPE

Definition at line 55 of file dl.h.

#define DLSTACK_PROTO7   DLSTACK_PROTO7_, ...

Definition at line 93 of file dl.h.

#define DLSTACK_PROTO7_   DLSTACK_PROTO6_, DLSTACK_TYPE

Definition at line 56 of file dl.h.

#define DLSTACK_PROTO8   DLSTACK_PROTO8_, ...

Definition at line 94 of file dl.h.

#define DLSTACK_PROTO8_   DLSTACK_PROTO7_, DLSTACK_TYPE

Definition at line 57 of file dl.h.

#define DLSTACK_PROTO9   DLSTACK_PROTO9_, ...

Definition at line 95 of file dl.h.

#define DLSTACK_PROTO9_   DLSTACK_PROTO8_, DLSTACK_TYPE

Definition at line 58 of file dl.h.

#define DLSTACK_SIZE   (20)

Definition at line 36 of file dl.h.

Referenced by Init_dl(), and rb_dlcfunc_call().

#define DLSTACK_TYPE   SIGNED_VALUE

Definition at line 35 of file dl.h.

Referenced by rb_dlcfunc_call().

#define DLTYPE_CHAR   2

Definition at line 165 of file dl.h.

Referenced by Init_dl(), and rb_dlcfunc_call().

#define DLTYPE_DOUBLE   8

Definition at line 173 of file dl.h.

Referenced by Init_dl(), and rb_dlcfunc_call().

#define DLTYPE_FLOAT   7

Definition at line 172 of file dl.h.

Referenced by Init_dl(), and rb_dlcfunc_call().

#define DLTYPE_INT   4

Definition at line 167 of file dl.h.

Referenced by Init_dl(), and rb_dlcfunc_call().

#define DLTYPE_LONG   5

Definition at line 168 of file dl.h.

Referenced by Init_dl(), and rb_dlcfunc_call().

#define DLTYPE_SHORT   3

Definition at line 166 of file dl.h.

Referenced by Init_dl(), and rb_dlcfunc_call().

#define DLTYPE_VOID   0

Definition at line 163 of file dl.h.

Referenced by Init_dl(), rb_dlcfunc_call(), rb_dlcfunc_initialize(), and rb_dlptr_free_get().

#define DLTYPE_VOIDP   1

Definition at line 164 of file dl.h.

Referenced by Init_dl(), and rb_dlcfunc_call().

#define FUNC_CDECL (   x  )     x

Definition at line 7 of file dl.h.

#define INT2BOOL (   x  )     (x?Qtrue:Qfalse)

Definition at line 186 of file dl.h.

#define MAX_CALLBACK   5

Definition at line 34 of file dl.h.

Referenced by Init_dl().

#define MAX_DLTYPE   9

Definition at line 174 of file dl.h.

#define NUM2PTR (   x  )     ((void*)(NUM2ULONG(x)))

Definition at line 178 of file dl.h.

Referenced by callback(), function_call(), get_freefunc(), id2ref(), rb_dl_callback_ptr_0_0_cdecl(), rb_dl_callback_ptr_0_1_cdecl(), rb_dl_callback_ptr_0_2_cdecl(), rb_dl_callback_ptr_0_3_cdecl(), rb_dl_callback_ptr_0_4_cdecl(), rb_dl_callback_ptr_10_0_cdecl(), rb_dl_callback_ptr_10_1_cdecl(), rb_dl_callback_ptr_10_2_cdecl(), rb_dl_callback_ptr_10_3_cdecl(), rb_dl_callback_ptr_10_4_cdecl(), rb_dl_callback_ptr_11_0_cdecl(), rb_dl_callback_ptr_11_1_cdecl(), rb_dl_callback_ptr_11_2_cdecl(), rb_dl_callback_ptr_11_3_cdecl(), rb_dl_callback_ptr_11_4_cdecl(), rb_dl_callback_ptr_12_0_cdecl(), rb_dl_callback_ptr_12_1_cdecl(), rb_dl_callback_ptr_12_2_cdecl(), rb_dl_callback_ptr_12_3_cdecl(), rb_dl_callback_ptr_12_4_cdecl(), rb_dl_callback_ptr_13_0_cdecl(), rb_dl_callback_ptr_13_1_cdecl(), rb_dl_callback_ptr_13_2_cdecl(), rb_dl_callback_ptr_13_3_cdecl(), rb_dl_callback_ptr_13_4_cdecl(), rb_dl_callback_ptr_14_0_cdecl(), rb_dl_callback_ptr_14_1_cdecl(), rb_dl_callback_ptr_14_2_cdecl(), rb_dl_callback_ptr_14_3_cdecl(), rb_dl_callback_ptr_14_4_cdecl(), rb_dl_callback_ptr_15_0_cdecl(), rb_dl_callback_ptr_15_1_cdecl(), rb_dl_callback_ptr_15_2_cdecl(), rb_dl_callback_ptr_15_3_cdecl(), rb_dl_callback_ptr_15_4_cdecl(), rb_dl_callback_ptr_16_0_cdecl(), rb_dl_callback_ptr_16_1_cdecl(), rb_dl_callback_ptr_16_2_cdecl(), rb_dl_callback_ptr_16_3_cdecl(), rb_dl_callback_ptr_16_4_cdecl(), rb_dl_callback_ptr_17_0_cdecl(), rb_dl_callback_ptr_17_1_cdecl(), rb_dl_callback_ptr_17_2_cdecl(), rb_dl_callback_ptr_17_3_cdecl(), rb_dl_callback_ptr_17_4_cdecl(), rb_dl_callback_ptr_18_0_cdecl(), rb_dl_callback_ptr_18_1_cdecl(), rb_dl_callback_ptr_18_2_cdecl(), rb_dl_callback_ptr_18_3_cdecl(), rb_dl_callback_ptr_18_4_cdecl(), rb_dl_callback_ptr_19_0_cdecl(), rb_dl_callback_ptr_19_1_cdecl(), rb_dl_callback_ptr_19_2_cdecl(), rb_dl_callback_ptr_19_3_cdecl(), rb_dl_callback_ptr_19_4_cdecl(), rb_dl_callback_ptr_1_0_cdecl(), rb_dl_callback_ptr_1_1_cdecl(), rb_dl_callback_ptr_1_2_cdecl(), rb_dl_callback_ptr_1_3_cdecl(), rb_dl_callback_ptr_1_4_cdecl(), rb_dl_callback_ptr_2_0_cdecl(), rb_dl_callback_ptr_2_1_cdecl(), rb_dl_callback_ptr_2_2_cdecl(), rb_dl_callback_ptr_2_3_cdecl(), rb_dl_callback_ptr_2_4_cdecl(), rb_dl_callback_ptr_3_0_cdecl(), rb_dl_callback_ptr_3_1_cdecl(), rb_dl_callback_ptr_3_2_cdecl(), rb_dl_callback_ptr_3_3_cdecl(), rb_dl_callback_ptr_3_4_cdecl(), rb_dl_callback_ptr_4_0_cdecl(), rb_dl_callback_ptr_4_1_cdecl(), rb_dl_callback_ptr_4_2_cdecl(), rb_dl_callback_ptr_4_3_cdecl(), rb_dl_callback_ptr_4_4_cdecl(), rb_dl_callback_ptr_5_0_cdecl(), rb_dl_callback_ptr_5_1_cdecl(), rb_dl_callback_ptr_5_2_cdecl(), rb_dl_callback_ptr_5_3_cdecl(), rb_dl_callback_ptr_5_4_cdecl(), rb_dl_callback_ptr_6_0_cdecl(), rb_dl_callback_ptr_6_1_cdecl(), rb_dl_callback_ptr_6_2_cdecl(), rb_dl_callback_ptr_6_3_cdecl(), rb_dl_callback_ptr_6_4_cdecl(), rb_dl_callback_ptr_7_0_cdecl(), rb_dl_callback_ptr_7_1_cdecl(), rb_dl_callback_ptr_7_2_cdecl(), rb_dl_callback_ptr_7_3_cdecl(), rb_dl_callback_ptr_7_4_cdecl(), rb_dl_callback_ptr_8_0_cdecl(), rb_dl_callback_ptr_8_1_cdecl(), rb_dl_callback_ptr_8_2_cdecl(), rb_dl_callback_ptr_8_3_cdecl(), rb_dl_callback_ptr_8_4_cdecl(), rb_dl_callback_ptr_9_0_cdecl(), rb_dl_callback_ptr_9_1_cdecl(), rb_dl_callback_ptr_9_2_cdecl(), rb_dl_callback_ptr_9_3_cdecl(), rb_dl_callback_ptr_9_4_cdecl(), rb_dl_free(), rb_dl_ptr2value(), rb_dl_realloc(), rb_dlcfunc_initialize(), rb_dlcfunc_set_ptr(), rb_dlptr_aset(), rb_dlptr_initialize(), rb_dlptr_s_to_ptr(), and value_to_generic().

#define PTR2NUM (   x  )     (ULONG2NUM((unsigned long)(x)))
#define RCFUNC_DATA (   obj  )     ((struct cfunc_data *)(DATA_PTR(obj)))

Definition at line 215 of file dl.h.

Referenced by get_freefunc().

#define RDL_HANDLE (   obj  )     ((struct dl_handle *)(DATA_PTR(obj)))

Definition at line 214 of file dl.h.

#define RPTR_DATA (   obj  )     ((struct ptr_data *)(DATA_PTR(obj)))

Typedef Documentation

typedef void(* freefunc_t)(void *)

Definition at line 188 of file dl.h.


Function Documentation

int rb_dlcfunc_kind_p ( VALUE  func  ) 

Definition at line 133 of file cfunc.c.

References rb_typeddata_is_kind_of().

Referenced by get_freefunc().

VALUE rb_dlcfunc_new ( void(*)()  func,
int  dltype,
const char *  name,
ID  calltype 
)
VALUE rb_dlptr_malloc ( long  size,
freefunc_t  func 
)

Definition at line 81 of file cptr.c.

References ptr_data::ptr, rb_dlptr_new(), rb_secure(), and ruby_xmalloc().

Referenced by rb_dlptr_s_malloc().

VALUE rb_dlptr_new ( void *  ptr,
long  size,
freefunc_t  func 
)
VALUE rb_dlptr_new2 ( VALUE  klass,
void *  ptr,
long  size,
freefunc_t  func 
)

Definition at line 59 of file cptr.c.

References dlptr_init(), ptr_data::free, ptr_data::ptr, rb_secure(), ptr_data::size, and TypedData_Make_Struct.

Referenced by rb_dlptr_new().


Variable Documentation

Definition at line 8 of file handle.c.

Referenced by Init_dlhandle(), predefined_dlhandle(), rb_dl_dlopen(), and rb_dlhandle_s_allocate().

Definition at line 8 of file dl.c.

Referenced by Init_dl(), and rb_dlcfunc_call().

Definition at line 6 of file dl.c.

Referenced by Init_callback(), Init_dl(), Init_dlcfunc(), Init_dlhandle(), and Init_dlptr().

Definition at line 10 of file dl.c.

Referenced by Init_dl().

Definition at line 11 of file dl.c.

Referenced by Init_dl().