Class: FFI::Type::Builtin
- Defined in:
- ext/ffi_c/Type.c,
ext/ffi_c/Type.c
Overview
Class for Built-in types.
Constant Summary
Constants inherited from FFI::Type
Instance Method Summary collapse
-
#inspect ⇒ String
Inspect Builtin object.
Methods inherited from FFI::Type
#alignment, #initialize, #size
Constructor Details
This class inherits a constructor from FFI::Type
Instance Method Details
#inspect ⇒ String
Inspect FFI::Type::Builtin object.
213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'ext/ffi_c/Type.c', line 213
static VALUE
builtin_type_inspect(VALUE self)
{
char buf[100];
BuiltinType *type;
TypedData_Get_Struct(self, BuiltinType, &builtin_type_data_type, type);
snprintf(buf, sizeof(buf), "#<%s::%s size=%d alignment=%d>",
rb_obj_classname(self), type->name, (int) type->type.ffiType->size, type->type.ffiType->alignment);
return rb_str_new2(buf);
}
|