Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions | Variables
fiddle.h File Reference
`#include <ruby.h>`
`#include <errno.h>`
`#include <ffi.h>`
`#include <closure.h>`
`#include <conversions.h>`
`#include <function.h>`
Include dependency graph for fiddle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | ffi_type_uchar ffi_type_uint8
#define | ffi_type_schar ffi_type_sint8
#define | TYPE_VOID 0
#define | TYPE_VOIDP 1
#define | TYPE_CHAR 2
#define | TYPE_SHORT 3
#define | TYPE_INT 4
#define | TYPE_LONG 5
#define | TYPE_FLOAT 7
#define | TYPE_DOUBLE 8
#define | ALIGN_OF(type) offsetof(struct {char align_c; type align_x;}, align_x)
#define | ALIGN_VOIDP ALIGN_OF(void*)
#define | ALIGN_SHORT ALIGN_OF(short)
#define | ALIGN_CHAR ALIGN_OF(char)
#define | ALIGN_INT ALIGN_OF(int)
#define | ALIGN_LONG ALIGN_OF(long)
#define | ALIGN_FLOAT ALIGN_OF(float)
#define | ALIGN_DOUBLE ALIGN_OF(double)

## Functions
VALUE | rb_fiddle_new_function (VALUE address, VALUE arg_types, VALUE ret_type)

## Variables
VALUE | mFiddle
VALUE | rb_eFiddleError

## Macro Definition Documentation

#define ALIGN_CHAR ALIGN_OF(char)

Definition at line 128 of file fiddle.h.

#define ALIGN_DOUBLE ALIGN_OF(double)

Definition at line 135 of file fiddle.h.

#define ALIGN_FLOAT ALIGN_OF(float)

Definition at line 134 of file fiddle.h.

#define ALIGN_INT ALIGN_OF(int)

Definition at line 129 of file fiddle.h.

#define ALIGN_LONG ALIGN_OF(long)

Definition at line 130 of file fiddle.h.

#define ALIGN_OF | ( |  | type | ) | offsetof(struct {char align_c; type align_x;}, align_x)

Definition at line 124 of file fiddle.h.

#define ALIGN_SHORT ALIGN_OF(short)

Definition at line 127 of file fiddle.h.

#define ALIGN_VOIDP ALIGN_OF(void*)

Definition at line 126 of file fiddle.h.

#define ffi_type_schar ffi_type_sint8

Definition at line 56 of file fiddle.h.

#define ffi_type_uchar ffi_type_uint8

Definition at line 55 of file fiddle.h.

#define TYPE_CHAR 2

Definition at line 114 of file fiddle.h.

Referenced by callback(), generic_to_value(), Init_fiddle(), int_to_ffi_type(), and value_to_generic().

#define TYPE_DOUBLE 8

Definition at line 122 of file fiddle.h.

Referenced by callback(), generic_to_value(), Init_fiddle(), int_to_ffi_type(), and value_to_generic().

#define TYPE_FLOAT 7

Definition at line 121 of file fiddle.h.

Referenced by callback(), generic_to_value(), Init_fiddle(), int_to_ffi_type(), and value_to_generic().

#define TYPE_INT 4

Definition at line 116 of file fiddle.h.

Referenced by callback(), generic_to_value(), Init_fiddle(), int_to_ffi_type(), and value_to_generic().

#define TYPE_LONG 5

Definition at line 117 of file fiddle.h.

Referenced by callback(), generic_to_value(), Init_fiddle(), int_to_ffi_type(), and value_to_generic().

#define TYPE_SHORT 3

Definition at line 115 of file fiddle.h.

Referenced by callback(), generic_to_value(), Init_fiddle(), int_to_ffi_type(), and value_to_generic().

#define TYPE_VOID 0

Definition at line 112 of file fiddle.h.

Referenced by callback(), generic_to_value(), Init_fiddle(), int_to_ffi_type(), rb_fiddle_ptr_free_get(), and value_to_generic().

#define TYPE_VOIDP 1

Definition at line 113 of file fiddle.h.

Referenced by callback(), function_call(), generic_to_value(), Init_fiddle(), int_to_ffi_type(), rb_fiddle_ptr_free_get(), and value_to_generic().

## Function Documentation

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

Definition at line 42 of file function.c.

References argv, cFiddleFunction, and rb_class_new_instance().

Referenced by rb_fiddle_ptr_free_get().

## Variable Documentation

VALUE mFiddle

Definition at line 3 of file fiddle.c.

Referenced by callback(), function_call(), generic_to_value(), Init_fiddle(), Init_fiddle_closure(), Init_fiddle_function(), Init_fiddle_handle(), and Init_fiddle_pointer().

VALUE rb_eFiddleError

Definition at line 4 of file fiddle.c.

Referenced by fiddle_handle_sym(), Init_fiddle(), rb_fiddle_handle_close(), rb_fiddle_handle_initialize(), rb_fiddle_handle_sym(), rb_fiddle_ptr_aref(), rb_fiddle_ptr_aset(), and rb_fiddle_ptr_s_to_ptr().