[前][次][番号順一覧][スレッド一覧]

ruby-changes:32753

From: ko1 <ko1@a...>
Date: Wed, 5 Feb 2014 14:41:13 +0900 (JST)
Subject: [ruby-changes:32753] ko1:r44832 (trunk): * ext/objspace/objspace_dump.c (dump_object): use STR_SHARED_P()

ko1	2014-02-05 14:41:04 +0900 (Wed, 05 Feb 2014)

  New Revision: 44832

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44832

  Log:
    * ext/objspace/objspace_dump.c (dump_object): use STR_SHARED_P()
      instead of removed STR_NOCAPA_P() macro.

  Modified files:
    trunk/ChangeLog
    trunk/ext/objspace/objspace_dump.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44831)
+++ ChangeLog	(revision 44832)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Feb  5 14:40:16 2014  Koichi Sasada  <ko1@a...>
+
+	* ext/objspace/objspace_dump.c (dump_object): use STR_SHARED_P()
+	  instead of removed STR_NOCAPA_P() macro.
+
 Wed Feb  5 13:51:33 2014  Koichi Sasada  <ko1@a...>
 
 	* internal.h, vm_core.h: move LIKELY/UNLIKELY/UNINITIALIZED_VAR()
Index: ext/objspace/objspace_dump.c
===================================================================
--- ext/objspace/objspace_dump.c	(revision 44831)
+++ ext/objspace/objspace_dump.c	(revision 44832)
@@ -182,7 +182,7 @@ dump_object(VALUE obj, struct dump_confi https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace_dump.c#L182
 	    dump_append(dc, ", \"shared\":true");
 	else {
 	    dump_append(dc, ", \"bytesize\":%ld", RSTRING_LEN(obj));
-	    if (!STR_EMBED_P(obj) && !STR_NOCAPA_P(obj) && (long)rb_str_capacity(obj) != 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));
 
 	    if (is_ascii_string(obj)) {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]