Ruby
2.0.0p648(2015-12-16revision53162)
|
Go to the source code of this file.
Macros | |
#define | DECL_FUNC_CDECL(f, ret, args, val) ret (FUNC_CDECL(*(f)))(args) = (ret (FUNC_CDECL(*))(args))(VALUE)(val) |
#define | CALL_CASE |
#define | CASE(n) |
#define | CASE(n) |
#define | CASE(n) |
#define | CASE(n) |
#define | CASE(n) |
#define | CASE(n) |
#define | CASE(n) |
#define | CASE(n) |
Variables | |
VALUE | rb_cDLCFunc |
static ID | id_last_error |
const rb_data_type_t | dlcfunc_data_type |
#define CALL_CASE |
Definition at line 318 of file cfunc.c.
Referenced by rb_dlcfunc_call().
#define CASE | ( | n | ) |
#define CASE | ( | n | ) |
#define CASE | ( | n | ) |
#define CASE | ( | n | ) |
#define CASE | ( | n | ) |
#define CASE | ( | n | ) |
#define CASE | ( | n | ) |
#define CASE | ( | n | ) |
#define DECL_FUNC_CDECL | ( | f, | |
ret, | |||
args, | |||
val | |||
) | ret (FUNC_CDECL(*(f)))(args) = (ret (FUNC_CDECL(*))(args))(VALUE)(val) |
|
static |
Definition at line 55 of file cfunc.c.
References cfunc_data::name, cfunc_data::ptr, and xfree().
|
static |
Definition at line 46 of file cfunc.c.
References cfunc_data::ptr, rb_gc_mark(), and cfunc_data::wrap.
|
static |
Definition at line 65 of file cfunc.c.
References cfunc_data::name, cfunc_data::ptr, size, and strlen().
void Init_dlcfunc | ( | void | ) |
Definition at line 622 of file cfunc.c.
References id_last_error, rb_cDLCFunc, rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_method(), rb_define_module_function(), rb_dl_get_last_error(), rb_dlcfunc_call(), rb_dlcfunc_calltype(), rb_dlcfunc_ctype(), rb_dlcfunc_initialize(), rb_dlcfunc_inspect(), rb_dlcfunc_name(), rb_dlcfunc_ptr(), rb_dlcfunc_s_allocate(), rb_dlcfunc_set_calltype(), rb_dlcfunc_set_ctype(), rb_dlcfunc_set_ptr(), rb_dlcfunc_to_i(), rb_intern, and rb_mDL.
Referenced by Init_dl().
Definition at line 15 of file cfunc.c.
References id_last_error, rb_thread_current(), and rb_thread_local_aref().
Referenced by Init_dlcfunc().
Definition at line 21 of file cfunc.c.
References id_last_error, Qnil, rb_thread_current(), rb_thread_local_aset(), and val.
Referenced by rb_dlcfunc_call().
void* rb_dlcfunc2ptr | ( | VALUE | val | ) |
Definition at line 105 of file cfunc.c.
References DATA_PTR, dlcfunc_data_type, func, NULL, cfunc_data::ptr, Qnil, rb_eTypeError, rb_raise(), rb_typeddata_is_kind_of(), and val.
Definition at line 340 of file cfunc.c.
References CALL_CASE, cfunc_data::calltype, CFUNC_CDECL, CFUNC_STDCALL, Check_Type, dlcfunc_data_type, DLSTACK_SIZE, DLSTACK_TYPE, DLTYPE_CHAR, DLTYPE_DOUBLE, DLTYPE_FLOAT, DLTYPE_INT, DLTYPE_LONG, DLTYPE_SHORT, DLTYPE_VOID, DLTYPE_VOIDP, errno, FIX2LONG, FIXNUM_P, i, INT2NUM, name, PRIxVALUE, cfunc_data::ptr, Qnil, RARRAY_LEN, RARRAY_PTR, rb_big2ulong_pack(), rb_check_safe_obj(), rb_dl_set_last_error(), rb_eDLError, rb_eDLTypeError, rb_id2name(), rb_raise(), rb_secure_update(), rb_to_int(), RB_TYPE_P, result, T_ARRAY, T_BIGNUM, T_FIXNUM, cfunc_data::type, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 231 of file cfunc.c.
References cfunc_data::calltype, dlcfunc_data_type, ID2SYM, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 200 of file cfunc.c.
References dlcfunc_data_type, INT2NUM, cfunc_data::type, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 153 of file cfunc.c.
References argc, argv, cfunc_data::calltype, CFUNC_CDECL, dlcfunc_data_type, DLTYPE_VOID, cfunc_data::name, name, NIL_P, NULL, NUM2INT, NUM2PTR, cfunc_data::ptr, Qnil, rb_Integer(), rb_scan_args(), strdup, StringValuePtr, SYM2ID, type, cfunc_data::type, TypedData_Get_Struct, cfunc_data::wrap, and xfree().
Referenced by Init_dlcfunc().
Definition at line 294 of file cfunc.c.
References dlcfunc_data_type, cfunc_data::name, OBJ_TAINT, cfunc_data::ptr, rb_sprintf(), cfunc_data::type, TypedData_Get_Struct, and val.
Referenced by Init_dlcfunc().
int rb_dlcfunc_kind_p | ( | VALUE | func | ) |
Definition at line 140 of file cfunc.c.
References dlcfunc_data_type, func, and rb_typeddata_is_kind_of().
Referenced by get_freefunc().
Definition at line 184 of file cfunc.c.
References dlcfunc_data_type, cfunc_data::name, Qnil, rb_tainted_str_new2(), and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 84 of file cfunc.c.
References cfunc_data::calltype, dlcfunc_data_type, func, cfunc_data::name, name, NULL, cfunc_data::ptr, Qnil, rb_cDLCFunc, rb_secure(), strdup, type, cfunc_data::type, TypedData_Make_Struct, and val.
Referenced by rb_dlptr_free_get().
Definition at line 262 of file cfunc.c.
References dlcfunc_data_type, cfunc_data::ptr, PTR2NUM, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 125 of file cfunc.c.
References cfunc_data::calltype, CFUNC_CDECL, dlcfunc_data_type, cfunc_data::name, cfunc_data::ptr, cfunc_data::type, and TypedData_Make_Struct.
Referenced by Init_dlcfunc().
Definition at line 246 of file cfunc.c.
References cfunc_data::calltype, dlcfunc_data_type, sym, SYM2ID, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 215 of file cfunc.c.
References dlcfunc_data_type, NUM2INT, cfunc_data::type, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 277 of file cfunc.c.
References dlcfunc_data_type, NUM2PTR, cfunc_data::ptr, Qnil, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 613 of file cfunc.c.
References dlcfunc_data_type, cfunc_data::ptr, PTR2NUM, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
const rb_data_type_t dlcfunc_data_type |
Definition at line 78 of file cfunc.c.
Referenced by rb_dlcfunc2ptr(), rb_dlcfunc_call(), rb_dlcfunc_calltype(), rb_dlcfunc_ctype(), rb_dlcfunc_initialize(), rb_dlcfunc_inspect(), rb_dlcfunc_kind_p(), rb_dlcfunc_name(), rb_dlcfunc_new(), rb_dlcfunc_ptr(), rb_dlcfunc_s_allocate(), rb_dlcfunc_set_calltype(), rb_dlcfunc_set_ctype(), rb_dlcfunc_set_ptr(), and rb_dlcfunc_to_i().
|
static |
Definition at line 12 of file cfunc.c.
Referenced by Init_dlcfunc(), rb_dl_get_last_error(), and rb_dl_set_last_error().
VALUE rb_cDLCFunc |
Definition at line 10 of file cfunc.c.
Referenced by Init_dlcfunc(), and rb_dlcfunc_new().