summaryrefslogtreecommitdiff
path: root/ext/objspace
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-08 09:59:36 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-08 09:59:36 (GMT)
commitd7d64d914780bb928d505835fd5229cba6e41039 (patch)
tree1af386f7689b6417aed33e9a2003120870353bab /ext/objspace
parentf0355ae7078c8539aaec5991411802c6fd055533 (diff)
objspace_dump.c: fix format
* ext/objspace/objspace_dump.c (dump_append_string_content), (dump_object): fix the format specifiers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/objspace')
-rw-r--r--ext/objspace/objspace_dump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c
index 65eabce..d73dfca 100644
--- a/ext/objspace/objspace_dump.c
+++ b/ext/objspace/objspace_dump.c
@@ -182,7 +182,7 @@ dump_append_string_content(struct dump_config *dc, VALUE obj)
{
dump_append(dc, ", \"bytesize\":%ld", RSTRING_LEN(obj));
if (!STR_EMBED_P(obj) && !STR_SHARED_P(obj) && (long)rb_str_capacity(obj) != RSTRING_LEN(obj))
- dump_append(dc, ", \"capacity\":%ld", rb_str_capacity(obj));
+ dump_append(dc, ", \"capacity\":%"PRIdSIZE, rb_str_capacity(obj));
if (is_ascii_string(obj)) {
dump_append(dc, ", \"value\":");
@@ -244,7 +244,7 @@ dump_object(VALUE obj, struct dump_config *dc)
break;
case T_HASH:
- dump_append(dc, ", \"size\":%ld", RHASH_SIZE(obj));
+ dump_append(dc, ", \"size\":%"PRIdSIZE, (size_t)RHASH_SIZE(obj));
if (FL_TEST(obj, HASH_PROC_DEFAULT))
dump_append(dc, ", \"default\":\"%p\"", (void *)RHASH_IFNONE(obj));
break;