Method: Fiddle::Pointer#inspect
- Defined in:
- ext/fiddle/pointer.c
#inspect ⇒ Object
Returns a string formatted with an easily readable representation of the internal state of the pointer.
561 562 563 564 565 566 567 568 569 |
# File 'ext/fiddle/pointer.c', line 561
static VALUE
rb_fiddle_ptr_inspect(VALUE self)
{
struct ptr_data *data;
TypedData_Get_Struct(self, struct ptr_data, &fiddle_ptr_data_type, data);
return rb_sprintf("#<%"PRIsVALUE":%p ptr=%p size=%ld free=%p>",
RB_OBJ_CLASSNAME(self), (void *)data, data->ptr, data->size, (void *)data->free);
}
|