Ruby
1.9.3p484(2013-11-22revision43786)
|
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 317 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 54 of file cfunc.c.
References cfunc_data::name, cfunc_data::ptr, and xfree().
|
static |
Definition at line 45 of file cfunc.c.
References cfunc_data::ptr, rb_gc_mark(), and cfunc_data::wrap.
|
static |
Definition at line 64 of file cfunc.c.
References cfunc_data::name, cfunc_data::ptr, size, and strlen().
void Init_dlcfunc | ( | void | ) |
Definition at line 621 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 14 of file cfunc.c.
References id_last_error, rb_thread_current(), and rb_thread_local_aref().
Referenced by Init_dlcfunc().
Definition at line 20 of file cfunc.c.
References id_last_error, Qnil, rb_thread_current(), and rb_thread_local_aset().
Referenced by rb_dlcfunc_call().
void* rb_dlcfunc2ptr | ( | VALUE | val | ) |
Definition at line 104 of file cfunc.c.
References DATA_PTR, func, NULL, cfunc_data::ptr, Qnil, rb_eTypeError, rb_raise(), and rb_typeddata_is_kind_of().
Definition at line 339 of file cfunc.c.
References arg, CALL_CASE, cfunc_data::calltype, CFUNC_CDECL, CFUNC_STDCALL, Check_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 230 of file cfunc.c.
References cfunc_data::calltype, ID2SYM, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 199 of file cfunc.c.
References INT2NUM(), cfunc_data::type, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 152 of file cfunc.c.
References cfunc_data::calltype, CFUNC_CDECL, 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 293 of file cfunc.c.
References cfunc_data::name, OBJ_TAINT, cfunc_data::ptr, rb_sprintf(), cfunc_data::type, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
int rb_dlcfunc_kind_p | ( | VALUE | func | ) |
Definition at line 139 of file cfunc.c.
References rb_typeddata_is_kind_of().
Referenced by get_freefunc().
Definition at line 183 of file cfunc.c.
References cfunc_data::name, Qnil, rb_tainted_str_new2(), and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 83 of file cfunc.c.
References cfunc_data::calltype, func, cfunc_data::name, NULL, cfunc_data::ptr, Qnil, rb_cDLCFunc, rb_secure(), strdup, type, cfunc_data::type, and TypedData_Make_Struct.
Referenced by rb_dlptr_free_get().
Definition at line 261 of file cfunc.c.
References cfunc_data::ptr, PTR2NUM, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 124 of file cfunc.c.
References cfunc_data::calltype, CFUNC_CDECL, cfunc_data::name, cfunc_data::ptr, cfunc_data::type, and TypedData_Make_Struct.
Referenced by Init_dlcfunc().
Definition at line 245 of file cfunc.c.
References cfunc_data::calltype, sym, SYM2ID, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 214 of file cfunc.c.
References NUM2INT, cfunc_data::type, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 276 of file cfunc.c.
References NUM2PTR, cfunc_data::ptr, Qnil, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
Definition at line 612 of file cfunc.c.
References cfunc_data::ptr, PTR2NUM, and TypedData_Get_Struct.
Referenced by Init_dlcfunc().
const rb_data_type_t dlcfunc_data_type |
|
static |
Definition at line 11 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 9 of file cfunc.c.
Referenced by Init_dlcfunc(), and rb_dlcfunc_new().