ext/fiddle/function.c File Reference

#include <fiddle.h>

Include dependency graph for function.c:

Go to the source code of this file.

Functions

static void deallocate (void *p)
static size_t function_memsize (const void *p)
static VALUE allocate (VALUE klass)
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


Function Documentation

static VALUE allocate ( VALUE  klass  )  [static]

Definition at line 34 of file function.c.

References function_data_type, and TypedData_Make_Struct.

static void deallocate ( void *  p  )  [static]

Definition at line 6 of file function.c.

References xfree.

static VALUE function_call ( int  argc,
VALUE  argv[],
VALUE  self 
) [static]

Definition at line 84 of file function.c.

References CLASS_OF, errno, function_data_type, GENERIC2VALUE, INT2NUM(), mFiddle, NIL_P, NULL, NUM2INT, NUM2PTR, RARRAY_LENINT, RARRAY_PTR, rb_const_get(), rb_eArgError, rb_funcall(), rb_Integer(), rb_intern, rb_iv_get(), rb_raise(), type, TYPE_VOIDP, TypedData_Get_Struct, VALUE2GENERIC, xcalloc, and xfree.

Referenced by Init_fiddle_function().

static size_t function_memsize ( const void *  p  )  [static]

Definition at line 14 of file function.c.

References size.

void Init_fiddle_function ( void   ) 

Definition at line 139 of file function.c.

References allocate(), cFiddleFunction, function_call(), initialize(), INT2NUM(), mFiddle, rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_const(), and rb_define_method().

Referenced by Init_fiddle().

static VALUE initialize ( int  argc,
VALUE  argv[],
VALUE  self 
) [static]

Definition at line 42 of file function.c.

References Check_Type, function_data_type, INT2FFI_TYPE, INT2NUM(), NIL_P, NULL, NUM2INT, RARRAY_LEN, RARRAY_LENINT, RARRAY_PTR, rb_eRuntimeError, rb_iv_set(), rb_raise(), rb_scan_args(), result, T_ARRAY, type, TypedData_Get_Struct, and xcalloc.


Variable Documentation

VALUE cFiddleFunction

Definition at line 3 of file function.c.

Referenced by Init_fiddle_function().

const rb_data_type_t function_data_type

Initial value:

 {
    "fiddle/function",
    0, deallocate, function_memsize,
}

Definition at line 28 of file function.c.

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


Generated on Wed Aug 10 09:17:58 2011 for Ruby by  doxygen 1.4.7