mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 22:14:37 +02:00
merge revision(s) 44572,44578,44591,44592: [Backport #9490]
ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@44903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
73fc780998
commit
565d568a45
9 changed files with 58 additions and 69 deletions
|
@ -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>",
|
||||
rb_obj_class(self), data, data->ptr, data->size, data->free);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue