9 if (ptr->arg_types)
xfree(ptr->arg_types);
16 ffi_cif *ptr = (ffi_cif *)p;
21 #if !defined(FFI_NO_RAW_API) || !FFI_NO_RAW_API
22 size += ffi_raw_size(ptr);
50 rb_scan_args(argc, argv,
"31", &ptr, &args, &ret_type, &abi);
57 rb_iv_set(
self,
"@return_type", ret_type);
70 result = ffi_prep_cif (
105 for (i = 0; i <
argc; i++) {
113 values =
xcalloc((
size_t)argc + 1, (
size_t)
sizeof(
void *));
116 for (i = 0; i <
argc; i++) {
123 }
else if(cPointer !=
CLASS_OF(src)) {
130 values[
i] = (
void *)&generic_args[i];
191 #ifdef HAVE_CONST_FFI_STDCALL
#define VALUE2GENERIC(_type, _src, _dst)
#define TypedData_Get_Struct(obj, type, data_type, sval)
static VALUE initialize(int argc, VALUE argv[], VALUE self)
static VALUE INT2NUM(int v)
VALUE rb_funcall(VALUE, ID, int,...)
Calls a method.
VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
Defines a class under the namespace of outer.
void rb_raise(VALUE exc, const char *fmt,...)
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
#define RARRAY_LEN(ARRAY)
static void deallocate(void *p)
RUBY_EXTERN VALUE rb_cObject
VALUE rb_iv_get(VALUE, const char *)
static VALUE function_call(int argc, VALUE argv[], VALUE self)
void rb_define_const(VALUE, const char *, VALUE)
#define INT2FFI_TYPE(_type)
VALUE rb_const_get(VALUE, ID)
VALUE rb_iv_set(VALUE, const char *, VALUE)
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
static VALUE allocate(VALUE klass)
#define RARRAY_PTR(ARRAY)
#define RARRAY_LENINT(ary)
const rb_data_type_t function_data_type
#define TypedData_Make_Struct(klass, type, data_type, sval)
#define GENERIC2VALUE(_type, _retval)
void Init_fiddle_function(void)
static size_t function_memsize(const void *p)
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)