summaryrefslogtreecommitdiff
path: root/ext/fiddle/pointer.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fiddle/pointer.c')
-rw-r--r--ext/fiddle/pointer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/fiddle/pointer.c b/ext/fiddle/pointer.c
index 4f4842f..ca09c41 100644
--- a/ext/fiddle/pointer.c
+++ b/ext/fiddle/pointer.c
@@ -427,12 +427,10 @@ static VALUE
rb_fiddle_ptr_inspect(VALUE self)
{
struct ptr_data *data;
- char str[1024];
TypedData_Get_Struct(self, struct ptr_data, &fiddle_ptr_data_type, data);
- snprintf(str, 1023, "#<%s:%p ptr=%p size=%ld free=%p>",
- rb_class2name(CLASS_OF(self)), data, data->ptr, data->size, data->free);
- return rb_str_new2(str);
+ return rb_sprintf("#<%"PRIsVALUE":%p ptr=%p size=%ld free=%p>",
+ CLASS_OF(self), data, data->ptr, data->size, data->free);
}
/*