summaryrefslogtreecommitdiff
path: root/ext/dl/cptr.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-12 08:11:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-12 08:11:36 +0000
commit9bd672f6682aef683c49f0b8da2b439e4d4103ac (patch)
tree17a6f91b7e705c4ba7bf32e6ceadd136e7b595f5 /ext/dl/cptr.c
parent42406852371bdf3fe3d2e4e51192c87720a8e568 (diff)
ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/cptr.c')
-rw-r--r--ext/dl/cptr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c
index 9e59139fc9..b3d7ef954a 100644
--- a/ext/dl/cptr.c
+++ b/ext/dl/cptr.c
@@ -391,9 +391,8 @@ rb_dlptr_inspect(VALUE self)
char str[1024];
TypedData_Get_Struct(self, struct ptr_data, &dlptr_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);
}
/*