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

ruby-changes:32745

From: ko1 <ko1@a...>
Date: Wed, 5 Feb 2014 12:14:39 +0900 (JST)
Subject: [ruby-changes:32745] ko1:r44824 (trunk): * string.c (RESIZE_CAPA): should not resize shared string.

ko1	2014-02-05 12:14:23 +0900 (Wed, 05 Feb 2014)

  New Revision: 44824

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

  Log:
    * string.c (RESIZE_CAPA): should not resize shared string.

  Modified files:
    trunk/ChangeLog
    trunk/string.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44823)
+++ ChangeLog	(revision 44824)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Feb  5 12:11:04 2014  Koichi Sasada  <ko1@a...>
+
+	* string.c (RESIZE_CAPA): should not resize shared string.
+
 Wed Feb  5 11:46:42 2014  Koichi Sasada  <ko1@a...>
 
 	* gc.c (gc_mark_children): STR_ASSOC is no longer available.
Index: string.c
===================================================================
--- string.c	(revision 44823)
+++ string.c	(revision 44824)
@@ -107,9 +107,9 @@ VALUE rb_cSymbol; https://github.com/ruby/ruby/blob/trunk/string.c#L107
 	}\
     }\
     else {\
+	assert(!FL_TEST((str), STR_SHARED)); \
 	REALLOC_N(RSTRING(str)->as.heap.ptr, char, (capacity)+termlen);\
-	if (!STR_NOCAPA_P(str))\
-	    RSTRING(str)->as.heap.aux.capa = (capacity);\
+	RSTRING(str)->as.heap.aux.capa = (capacity);\
     }\
 } while (0)
 

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

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