Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Data Structures | |
struct | fiddle_closure |
struct | callback_args |
Macros | |
#define | USE_FFI_CLOSURE_ALLOC 1 |
Functions | |
static void | dealloc (void *ptr) |
static size_t | closure_memsize (const void *ptr) |
static void * | with_gvl_callback (void *ptr) |
static void | callback (ffi_cif *cif, void *resp, void **args, void *ctx) |
static VALUE | allocate (VALUE klass) |
static VALUE | initialize (int rbargc, VALUE argv[], VALUE self) |
static VALUE | to_i (VALUE self) |
void | Init_fiddle_closure (void) |
Variables | |
VALUE | cFiddleClosure |
const rb_data_type_t | closure_data_type |
Definition at line 200 of file closure.c.
References fiddle_closure::code, NULL, fiddle_closure::pcl, and TypedData_Make_Struct.
Referenced by Init_fiddle_closure().
|
static |
Definition at line 183 of file closure.c.
References callback_args::args, callback_args::cif, callback_args::ctx, rb_thread_call_with_gvl(), callback_args::resp, ruby_thread_has_gvl_p(), and with_gvl_callback().
Referenced by initialize(), rb_objspace_each_objects(), rb_objspace_each_objects_without_setup(), and transcode_search_path().
|
static |
Definition at line 39 of file closure.c.
References fiddle_closure::argv, fiddle_closure::cif, ffi_raw_size(), and size.
|
static |
Definition at line 26 of file closure.c.
References fiddle_closure::argv, fiddle_closure::pcl, and xfree().
void Init_fiddle_closure | ( | void | ) |
Definition at line 291 of file closure.c.
References allocate(), cFiddleClosure, initialize(), mFiddle, rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_method(), rb_define_module(), and to_i().
Referenced by Init_fiddle().
Definition at line 218 of file closure.c.
References argc, callback_args::args, fiddle_closure::argv, callback(), Check_Type, fiddle_closure::cif, callback_args::cif, fiddle_closure::code, FFI_DEFAULT_ABI, ffi_prep_cif(), ffi_prep_closure_loc(), INT2FFI_TYPE, INT2NUM, NULL, NUM2INT, fiddle_closure::pcl, RARRAY_AREF, RARRAY_LENINT, rb_eRuntimeError, rb_iv_set(), rb_raise(), rb_scan_args(), rb_sys_fail(), result, T_ARRAY, TypedData_Get_Struct, and xcalloc.
Referenced by Init_fiddle_closure().
Definition at line 278 of file closure.c.
References fiddle_closure::code, PTR2NUM, and TypedData_Get_Struct.
Referenced by Init_fiddle_closure().
|
static |
Definition at line 67 of file closure.c.
References argc, callback_args::args, callback_args::ctx, INT2NUM, LONG2NUM, mFiddle, NUM2DBL, NUM2INT, NUM2LONG, NUM2PTR, NUM2UINT, NUM2ULONG, PTR2NUM, RARRAY_AREF, RARRAY_CONST_PTR, RARRAY_LENINT, rb_ary_push(), rb_ary_tmp_new(), rb_const_get(), rb_eRuntimeError, rb_float_new, rb_funcall(), rb_funcall2, RB_GC_GUARD, rb_intern, rb_iv_get(), rb_raise(), callback_args::resp, TYPE_CHAR, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_SHORT, TYPE_VOID, TYPE_VOIDP, UINT2NUM, and ULONG2NUM.
Referenced by callback().
VALUE cFiddleClosure |
Definition at line 5 of file closure.c.
Referenced by Init_fiddle_closure().
const rb_data_type_t closure_data_type |