#include <fiddle.h>
Include dependency graph for closure.c:
Go to the source code of this file.
Data Structures | |
struct | fiddle_closure |
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 138 of file closure.c.
References fiddle_closure::cif, closure_data_type, fiddle_closure::code, NULL, fiddle_closure::pcl, TypedData_Make_Struct, and xmalloc.
Referenced by Init_fiddle_closure(), Init_fiddle_function(), and Init_psych_emitter().
void callback | ( | ffi_cif * | cif, | |
void * | resp, | |||
void ** | args, | |||
void * | ctx | |||
) |
Definition at line 54 of file closure.c.
References argc, INT2NUM(), LONG2NUM, mFiddle, NUM2DBL, NUM2INT, NUM2LONG(), NUM2PTR, PTR2NUM, RARRAY_LENINT, RARRAY_PTR, rb_const_get(), rb_eRuntimeError, rb_float_new(), rb_funcall(), rb_funcall2(), rb_intern, rb_iv_get(), rb_raise(), type, TYPE_CHAR, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_VOID, TYPE_VOIDP, xcalloc, and xfree.
Referenced by initialize(), and transcode_search_path().
static size_t closure_memsize | ( | const void * | ptr | ) | [static] |
Definition at line 32 of file closure.c.
References fiddle_closure::argv, fiddle_closure::cif, and size.
static void dealloc | ( | void * | ptr | ) | [static] |
Definition at line 18 of file closure.c.
References fiddle_closure::argv, fiddle_closure::cif, fiddle_closure::pcl, and xfree.
Referenced by allocate().
void Init_fiddle_closure | ( | ) |
Definition at line 227 of file closure.c.
References allocate(), cFiddleClosure, initialize(), mFiddle, rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_method(), and to_i().
Referenced by Init_fiddle().
Definition at line 157 of file closure.c.
References argc, fiddle_closure::argv, callback(), Check_Type, fiddle_closure::cif, closure_data_type, fiddle_closure::code, INT2FFI_TYPE, INT2NUM(), NULL, NUM2INT, fiddle_closure::pcl, RARRAY_LENINT, RARRAY_PTR, rb_eRuntimeError, rb_iv_set(), rb_raise(), rb_scan_args(), result, T_ARRAY, type, TypedData_Get_Struct, and xcalloc.
Referenced by Init_fiddle_closure(), Init_fiddle_function(), and Init_psych_emitter().
Definition at line 214 of file closure.c.
References closure_data_type, fiddle_closure::code, PTR2NUM, and TypedData_Get_Struct.
Referenced by Init_fiddle_closure().
Initial value:
{ "fiddle/closure", 0, dealloc, closure_memsize, }
Definition at line 48 of file closure.c.
Referenced by allocate(), initialize(), and to_i().