ruby-changes:42874
From: nobu <ko1@a...>
Date: Sun, 8 May 2016 18:02:59 +0900 (JST)
Subject: [ruby-changes:42874] nobu:r54948 (trunk): objspace_dump.c: fix format
nobu 2016-05-08 18:59:36 +0900 (Sun, 08 May 2016) New Revision: 54948 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54948 Log: objspace_dump.c: fix format * ext/objspace/objspace_dump.c (dump_append_string_content), (dump_object): fix the format specifiers. Modified files: trunk/ext/objspace/objspace_dump.c Index: ext/objspace/objspace_dump.c =================================================================== --- ext/objspace/objspace_dump.c (revision 54947) +++ ext/objspace/objspace_dump.c (revision 54948) @@ -182,7 +182,7 @@ dump_append_string_content(struct dump_c https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace_dump.c#L182 { 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_confi https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace_dump.c#L244 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/