Ruby
2.5.0dev(2017-10-22revision60238)
|
#include <fiddle.h>
Go to the source code of this file.
Macros | |
#define | rb_ffi_type_of(t) (signed_p ? &ffi_type_s##t : &ffi_type_u##t) |
Functions | |
ffi_type * | int_to_ffi_type (int type) |
void | value_to_generic (int type, VALUE src, fiddle_generic *dst) |
VALUE | generic_to_value (VALUE rettype, fiddle_generic retval) |
#define rb_ffi_type_of | ( | t | ) | (signed_p ? &ffi_type_s##t : &ffi_type_u##t) |
Referenced by int_to_ffi_type().
VALUE generic_to_value | ( | VALUE | rettype, |
fiddle_generic | retval | ||
) |
Definition at line 95 of file conversions.c.
References fiddle_generic::ddouble, fiddle_generic::fffi_arg, fiddle_generic::fffi_sarg, fiddle_generic::ffloat, INT2NUM, LONG2NUM, mFiddle, NUM2INT, fiddle_generic::pointer, PTR2NUM, Qnil, rb_const_get(), rb_eRuntimeError, rb_float_new, rb_funcall(), rb_intern, rb_raise(), fiddle_generic::slong, TYPE_CHAR, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_SHORT, TYPE_VOID, TYPE_VOIDP, UINT2NUM, fiddle_generic::ulong, ULONG2NUM, and UNREACHABLE.
ffi_type* int_to_ffi_type | ( | int | type | ) |
Definition at line 4 of file conversions.c.
References rb_eRuntimeError, rb_ffi_type_of, rb_raise(), TYPE_CHAR, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_SHORT, TYPE_VOID, and TYPE_VOIDP.
void value_to_generic | ( | int | type, |
VALUE | src, | ||
fiddle_generic * | dst | ||
) |
Definition at line 43 of file conversions.c.
References fiddle_generic::ddouble, fiddle_generic::ffloat, NUM2DBL, NUM2INT, NUM2LONG, NUM2PTR, NUM2UINT, NUM2ULONG, fiddle_generic::pointer, rb_eRuntimeError, rb_Integer(), rb_raise(), fiddle_generic::schar, fiddle_generic::sint, fiddle_generic::slong, fiddle_generic::sshort, TYPE_CHAR, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_SHORT, TYPE_VOID, TYPE_VOIDP, fiddle_generic::uchar, fiddle_generic::uint, and fiddle_generic::ulong.