Ruby  2.0.0p648(2015-12-16revision53162)
Data Structures | Functions | Variables
closure.c File Reference
#include <fiddle.h>

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
 

Function Documentation

◆ allocate()

static VALUE allocate ( VALUE  klass)
static

◆ callback()

void callback ( ffi_cif *  cif,
void *  resp,
void **  args,
void *  ctx 
)

◆ closure_memsize()

static size_t closure_memsize ( const void *  ptr)
static

Definition at line 31 of file closure.c.

References fiddle_closure::argv, fiddle_closure::cif, and size.

◆ dealloc()

static void dealloc ( void *  ptr)
static

Definition at line 18 of file closure.c.

References fiddle_closure::argv, fiddle_closure::pcl, and xfree().

◆ Init_fiddle_closure()

void Init_fiddle_closure ( )

◆ initialize()

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

◆ to_i()

static VALUE to_i ( VALUE  self)
static

Definition at line 244 of file closure.c.

References closure_data_type, fiddle_closure::code, PTR2NUM, and TypedData_Get_Struct.

Referenced by Init_fiddle_closure().

Variable Documentation

◆ cFiddleClosure

VALUE cFiddleClosure

Definition at line 3 of file closure.c.

Referenced by Init_fiddle_closure().

◆ closure_data_type

const rb_data_type_t closure_data_type
Initial value:
= {
"fiddle/closure",
}
static void dealloc(void *ptr)
Definition: closure.c:18
static size_t closure_memsize(const void *ptr)
Definition: closure.c:31

Definition at line 47 of file closure.c.

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