Ruby
2.0.0p247(2013-06-27revision41674)
|
Go to the source code of this file.
Variables | |
VALUE | rb_cDLCPtr |
static ID | id_to_ptr |
static const rb_data_type_t | dlptr_data_type |
Definition at line 44 of file cptr.c.
References data, ptr_data::free, ptr_data::ptr, and ptr.
Definition at line 32 of file cptr.c.
References data, ptr, rb_gc_mark(), and ptr_data::wrap.
Definition at line 55 of file cptr.c.
References data, ptr, and ptr_data::size.
|
inlinestatic |
Definition at line 13 of file cptr.c.
References func, NIL_P(), NULL, NUM2PTR, rb_dlcfunc_kind_p(), rb_Integer(), and RCFUNC_DATA.
Referenced by rb_dlptr_free_set(), rb_dlptr_initialize(), and rb_dlptr_s_malloc().
Definition at line 630 of file cptr.c.
References id_to_ptr, rb_cDLCPtr, rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_const(), rb_define_method(), rb_define_singleton_method(), rb_dlptr_aref(), rb_dlptr_aset(), rb_dlptr_cmp(), rb_dlptr_eql(), rb_dlptr_free_get(), rb_dlptr_free_set(), rb_dlptr_initialize(), rb_dlptr_inspect(), rb_dlptr_minus(), rb_dlptr_new(), rb_dlptr_null_p(), rb_dlptr_plus(), rb_dlptr_ptr(), rb_dlptr_ref(), rb_dlptr_s_allocate(), rb_dlptr_s_malloc(), rb_dlptr_s_to_ptr(), rb_dlptr_size_get(), rb_dlptr_size_set(), rb_dlptr_to_i(), rb_dlptr_to_s(), rb_dlptr_to_str(), rb_dlptr_to_value(), rb_intern, and rb_mDL.
Referenced by Init_dl().
Definition at line 100 of file cptr.c.
References data, NULL, ptr_data::ptr, ptr, Qnil, rb_cDLCPtr, rb_eTypeError, rb_obj_is_kind_of(), rb_raise(), and TypedData_Get_Struct.
Referenced by rb_dlptr_aset(), rb_dlptr_cmp(), rb_dlptr_eql(), rb_dlptr_minus(), and rb_dlptr_plus().
Definition at line 491 of file cptr.c.
References data, INT2NUM, len, NUM2ULONG, ptr_data::ptr, Qnil, rb_bug(), rb_eDLError, rb_raise(), rb_scan_args(), rb_tainted_str_new(), retval, and TypedData_Get_Struct.
Referenced by Init_dlptr().
Definition at line 526 of file cptr.c.
References data, len, memcpy(), NUM2PTR, NUM2UINT, NUM2ULONG, ptr_data::ptr, Qnil, rb_bug(), rb_cDLCPtr, rb_dlptr2cptr(), rb_eDLError, rb_obj_is_kind_of(), rb_raise(), rb_scan_args(), RB_TYPE_P, retval, StringValuePtr, T_STRING, and TypedData_Get_Struct.
Referenced by Init_dlptr().
Definition at line 431 of file cptr.c.
References diff(), INT2FIX, INT2NUM, Qnil, rb_cDLCPtr, rb_dlptr2cptr(), rb_obj_is_kind_of(), and SIGNED_VALUE.
Referenced by Init_dlptr().
Definition at line 411 of file cptr.c.
References Qfalse, Qtrue, rb_cDLCPtr, rb_dlptr2cptr(), and rb_obj_is_kind_of().
Referenced by Init_dlptr().
Definition at line 309 of file cptr.c.
References CFUNC_CDECL, DLTYPE_VOID, ptr_data::free, rb_dlcfunc_new(), and TypedData_Get_Struct.
Referenced by Init_dlptr().
Definition at line 293 of file cptr.c.
References data, ptr_data::free, get_freefunc(), Qnil, TypedData_Get_Struct, and ptr_data::wrap.
Referenced by Init_dlptr().
Definition at line 144 of file cptr.c.
References data, f, ptr_data::free, get_freefunc(), NULL, NUM2LONG, NUM2PTR, p, ptr_data::ptr, ptr, Qnil, rb_Integer(), rb_scan_args(), s, size, ptr_data::size, sym, TypedData_Get_Struct, and ptr_data::wrap.
Referenced by Init_dlptr().
Definition at line 391 of file cptr.c.
References CLASS_OF, data, ptr_data::free, ptr_data::ptr, rb_class2name(), rb_str_new2, ptr_data::size, snprintf, str, and TypedData_Get_Struct.
Referenced by Init_dlptr().
VALUE rb_dlptr_malloc | ( | long | size, |
freefunc_t | func | ||
) |
Definition at line 89 of file cptr.c.
References memset(), ptr, rb_dlptr_new(), rb_secure(), and ruby_xmalloc().
Referenced by rb_dlptr_s_malloc().
Definition at line 470 of file cptr.c.
References NUM2LONG, ptr, rb_dlptr2cptr(), rb_dlptr_new(), RPTR_DATA, and size.
Referenced by Init_dlptr().
VALUE rb_dlptr_new | ( | void * | ptr, |
long | size, | ||
freefunc_t | func | ||
) |
Definition at line 83 of file cptr.c.
References rb_cDLCPtr, and rb_dlptr_new2().
Referenced by Init_dlptr(), rb_dlptr_malloc(), rb_dlptr_minus(), rb_dlptr_plus(), rb_dlptr_ptr(), rb_dlptr_ref(), and rb_dlptr_s_to_ptr().
VALUE rb_dlptr_new2 | ( | VALUE | klass, |
void * | ptr, | ||
long | size, | ||
freefunc_t | func | ||
) |
Definition at line 67 of file cptr.c.
References data, ptr_data::free, func, OBJ_TAINT, ptr_data::ptr, ptr, rb_secure(), size, ptr_data::size, TypedData_Make_Struct, and val.
Referenced by rb_dlptr_new().
Definition at line 279 of file cptr.c.
References data, ptr_data::ptr, Qfalse, Qtrue, and TypedData_Get_Struct.
Referenced by Init_dlptr().
Definition at line 452 of file cptr.c.
References NUM2LONG, ptr, rb_dlptr2cptr(), rb_dlptr_new(), RPTR_DATA, and size.
Referenced by Init_dlptr().
Definition at line 250 of file cptr.c.
References data, ptr_data::ptr, rb_dlptr_new(), and TypedData_Get_Struct.
Referenced by Init_dlptr().
Definition at line 265 of file cptr.c.
References data, ptr_data::ptr, rb_dlptr_new(), and TypedData_Get_Struct.
Referenced by Init_dlptr().
Definition at line 120 of file cptr.c.
References data, ptr_data::free, obj, ptr_data::ptr, rb_secure(), ptr_data::size, and TypedData_Make_Struct.
Referenced by Init_dlptr().
Definition at line 191 of file cptr.c.
References f, get_freefunc(), NULL, NUM2LONG, obj, rb_bug(), rb_dlptr_malloc(), rb_scan_args(), RPTR_DATA, s, size, sym, and ptr_data::wrap.
Referenced by Init_dlptr().
Definition at line 595 of file cptr.c.
References GetOpenFile, id_to_ptr, NULL, NUM2PTR, OBJ_INFECT, ptr, Qundef, rb_cDLCPtr, rb_check_funcall(), rb_cIO, rb_cString, rb_dlptr_new(), rb_eDLError, rb_Integer(), rb_io_stdio_file(), rb_obj_is_kind_of(), rb_raise(), RPTR_DATA, RSTRING_LEN, RTEST, str, StringValuePtr, val, and ptr_data::wrap.
Referenced by Init_dlptr().
Definition at line 222 of file cptr.c.
References data, ptr_data::ptr, PTR2NUM, and TypedData_Get_Struct.
Referenced by Init_dlptr().
Definition at line 329 of file cptr.c.
References data, len, NUM2INT, ptr_data::ptr, rb_bug(), rb_scan_args(), rb_tainted_str_new(), rb_tainted_str_new2, TypedData_Get_Struct, and val.
Referenced by Init_dlptr().
Definition at line 362 of file cptr.c.
References data, len, NUM2INT, ptr_data::ptr, rb_bug(), rb_scan_args(), rb_tainted_str_new(), ptr_data::size, TypedData_Get_Struct, and val.
Referenced by Init_dlptr().
Definition at line 236 of file cptr.c.
References data, ptr_data::ptr, and TypedData_Get_Struct.
Referenced by Init_dlptr().
|
static |
|
static |
Definition at line 29 of file cptr.c.
Referenced by Init_dlptr(), and rb_dlptr_s_to_ptr().
VALUE rb_cDLCPtr |
Definition at line 10 of file cptr.c.
Referenced by Init_dlptr(), rb_dlptr2cptr(), rb_dlptr_aset(), rb_dlptr_cmp(), rb_dlptr_eql(), rb_dlptr_new(), and rb_dlptr_s_to_ptr().