Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

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>`

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

## ◆ ALIGN_CHAR

#define ALIGN_CHAR ALIGN_OF(char)

Definition at line 123 of file fiddle.h.

## ◆ ALIGN_DOUBLE

#define ALIGN_DOUBLE ALIGN_OF(double)

Definition at line 130 of file fiddle.h.

## ◆ ALIGN_FLOAT

#define ALIGN_FLOAT ALIGN_OF(float)

Definition at line 129 of file fiddle.h.

## ◆ ALIGN_INT

#define ALIGN_INT ALIGN_OF(int)

Definition at line 124 of file fiddle.h.

## ◆ ALIGN_LONG

#define ALIGN_LONG ALIGN_OF(long)

Definition at line 125 of file fiddle.h.

## ◆ ALIGN_OF

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

Definition at line 119 of file fiddle.h.

## ◆ ALIGN_SHORT

#define ALIGN_SHORT ALIGN_OF(short)

Definition at line 122 of file fiddle.h.

## ◆ ALIGN_VOIDP

#define ALIGN_VOIDP ALIGN_OF(void*)

Definition at line 121 of file fiddle.h.

## ◆ ffi_type_schar

#define ffi_type_schar ffi_type_sint8

Definition at line 56 of file fiddle.h.

## ◆ ffi_type_uchar

#define ffi_type_uchar ffi_type_uint8

Definition at line 55 of file fiddle.h.

## ◆ TYPE_CHAR

#define TYPE_CHAR 2

Definition at line 109 of file fiddle.h.

## ◆ TYPE_DOUBLE

#define TYPE_DOUBLE 8

Definition at line 117 of file fiddle.h.

## ◆ TYPE_FLOAT

#define TYPE_FLOAT 7

Definition at line 116 of file fiddle.h.

## ◆ TYPE_INT

#define TYPE_INT 4

Definition at line 111 of file fiddle.h.

## ◆ TYPE_LONG

#define TYPE_LONG 5

Definition at line 112 of file fiddle.h.

## ◆ TYPE_SHORT

#define TYPE_SHORT 3

Definition at line 110 of file fiddle.h.

## ◆ TYPE_VOID

#define TYPE_VOID 0

Definition at line 107 of file fiddle.h.

## ◆ TYPE_VOIDP

#define TYPE_VOIDP 1

Definition at line 108 of file fiddle.h.

## Function Documentation

## ◆ rb_fiddle_new_function()

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

Definition at line 67 of file function.c.

References argv, cFiddleFunction, and rb_class_new_instance().

## Variable Documentation

## ◆ mFiddle

VALUE mFiddle

Definition at line 3 of file fiddle.c.

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

## ◆ rb_eFiddleError

VALUE rb_eFiddleError

Definition at line 4 of file fiddle.c.

Referenced by Init_fiddle().