Ruby
2.1.10p492(2016-04-01revision54464)
|
#include <fiddle.h>
Go to the source code of this file.
Data Structures | |
struct | fiddle_closure |
Macros | |
#define | USE_FFI_CLOSURE_ALLOC 1 |
Functions | |
static void | dealloc (void *ptr) |
static size_t | closure_memsize (const void *ptr) |
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 () |
Variables | |
VALUE | cFiddleClosure |
const rb_data_type_t | closure_data_type |
Definition at line 172 of file closure.c.
References fiddle_closure::code, i, NULL, fiddle_closure::pcl, and TypedData_Make_Struct.
Referenced by Init_fiddle_closure().
Definition at line 59 of file closure.c.
References argc, i, INT2NUM, LONG2NUM, mFiddle, NUM2DBL, NUM2INT, NUM2LONG, NUM2PTR, NUM2UINT, NUM2ULONG, PTR2NUM, RARRAY_LENINT, RARRAY_PTR(), 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(), ret, type, TYPE_CHAR, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_SHORT, TYPE_VOID, TYPE_VOIDP, UINT2NUM, and ULONG2NUM.
Referenced by initialize(), rb_objspace_each_objects(), and transcode_search_path().
Definition at line 37 of file closure.c.
References fiddle_closure::argv, fiddle_closure::cif, and size.
Definition at line 24 of file closure.c.
References fiddle_closure::argv, fiddle_closure::pcl, and xfree.
void Init_fiddle_closure | ( | ) |
Definition at line 263 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 190 of file closure.c.
References argc, args, fiddle_closure::argv, callback(), Check_Type(), fiddle_closure::cif, fiddle_closure::code, i, INT2FFI_TYPE, INT2NUM, NULL, NUM2INT, fiddle_closure::pcl, RARRAY_LENINT, RARRAY_PTR(), rb_eRuntimeError, rb_iv_set(), rb_raise(), rb_scan_args(), rb_sys_fail(), result, ret, T_ARRAY, type, TypedData_Get_Struct, and xcalloc.
Referenced by Init_fiddle_closure().
Definition at line 250 of file closure.c.
References fiddle_closure::code, code, PTR2NUM, and TypedData_Get_Struct.
Referenced by Init_fiddle_closure().
VALUE cFiddleClosure |
Definition at line 3 of file closure.c.
Referenced by Init_fiddle_closure().
const rb_data_type_t closure_data_type |