Method: FFI::Type::Builtin#inspect
- Defined in:
- ext/ffi_c/Type.c
#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); } |