ext/fiddle/function.c File Reference

#include <fiddle.h>

Go to the source code of this file.

Defines

#define RB_OBJ_CLASSNAME(obj)   rb_obj_class(obj)
#define RB_OBJ_STRING(obj)   (obj)

Functions

static void deallocate (void *p)
static size_t function_memsize (const void *p)
static VALUE allocate (VALUE klass)
VALUE rb_fiddle_new_function (VALUE address, VALUE arg_types, VALUE ret_type)
static int parse_keyword_arg_i (VALUE key, VALUE value, VALUE self)
static VALUE initialize (int argc, VALUE argv[], VALUE self)
static VALUE function_call (int argc, VALUE argv[], VALUE self)
void Init_fiddle_function (void)

Variables

VALUE cFiddleFunction
const rb_data_type_t function_data_type

Define Documentation

#define RB_OBJ_CLASSNAME ( obj   )     rb_obj_class(obj)

Definition at line 4 of file function.c.

#define RB_OBJ_STRING ( obj   )     (obj)

Definition at line 5 of file function.c.


Function Documentation

static VALUE allocate ( VALUE  klass  )  [static]

Definition at line 43 of file function.c.

References function_data_type, and TypedData_Make_Struct.

Referenced by Init_fiddle_function().

static void deallocate ( void *  p  )  [static]

Definition at line 15 of file function.c.

References xfree.

static VALUE function_call ( int  argc,
VALUE  argv[],
VALUE  self 
) [static]
static size_t function_memsize ( const void *  p  )  [static]

Definition at line 23 of file function.c.

References size.

void Init_fiddle_function ( void   ) 
static VALUE initialize ( int  argc,
VALUE  argv[],
VALUE  self 
) [static]
static int parse_keyword_arg_i ( VALUE  key,
VALUE  value,
VALUE  self 
) [static]

Definition at line 63 of file function.c.

References ID2SYM, PRIsVALUE, rb_eArgError, rb_intern, rb_iv_set(), RB_OBJ_STRING, and rb_raise().

Referenced by initialize().

VALUE rb_fiddle_new_function ( VALUE  address,
VALUE  arg_types,
VALUE  ret_type 
)

Definition at line 51 of file function.c.

References argv, cFiddleFunction, and rb_class_new_instance().

Referenced by rb_fiddle_ptr_free_get().


Variable Documentation

Definition at line 12 of file function.c.

Referenced by Init_fiddle_function(), and rb_fiddle_new_function().

const rb_data_type_t function_data_type
Initial value:
 {
    "fiddle/function",
    {0, deallocate, function_memsize,},
}

Definition at line 37 of file function.c.

Referenced by allocate(), function_call(), and initialize().


Generated on 18 May 2020 for Ruby by  doxygen 1.6.1