Class: FFI::Type::Builtin

Inherits:
FFI::Type show all
Defined in:
ext/ffi_c/Type.c

Constant Summary

Constants inherited from FFI::Type

Array, Function, Struct

Instance Method Summary collapse

Instance Method Details

#inspectObject



104
105
106
107
108
109
110
111
112
113
114
115
# File 'ext/ffi_c/Type.c', line 104

static VALUE
type_inspect(VALUE self)
{
    char buf[256];
    Type *type;

    Data_Get_Struct(self, Type, type);
    snprintf(buf, sizeof(buf), "#<FFI::Type:%p size=%d alignment=%d>", 
            type, (int) type->ffiType->size, (int) type->ffiType->alignment);

    return rb_str_new2(buf);
}