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

ruby-changes:36614

From: nobu <ko1@a...>
Date: Wed, 3 Dec 2014 14:34:24 +0900 (JST)
Subject: [ruby-changes:36614] nobu:r48695 (trunk): string.c: fake string is not sharing

nobu	2014-12-03 14:34:10 +0900 (Wed, 03 Dec 2014)

  New Revision: 48695

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

  Log:
    string.c: fake string is not sharing
    
    * string.c (setup_fake_str): fake string does not share another
      string, but just should not free.

  Modified files:
    trunk/ChangeLog
    trunk/string.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48694)
+++ ChangeLog	(revision 48695)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Dec  3 14:34:07 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* string.c (setup_fake_str): fake string does not share another
+	  string, but just should not free.
+
 Wed Dec  3 11:14:14 2014  NAKAMURA Usaku  <usa@r...>
 
 	* win32/win32.c (w32_spawn): `v2` is used not only for `shell` but also
Index: string.c
===================================================================
--- string.c	(revision 48694)
+++ string.c	(revision 48695)
@@ -250,7 +250,7 @@ rb_fstring(VALUE str) https://github.com/ruby/ruby/blob/trunk/string.c#L250
 static VALUE
 setup_fake_str(struct RString *fake_str, const char *name, long len, int encidx)
 {
-    fake_str->basic.flags = T_STRING|RSTRING_NOEMBED|ELTS_SHARED;
+    fake_str->basic.flags = T_STRING|RSTRING_NOEMBED|STR_NOFREE;
     /* SHARED to be allocated by the callback */
 
     ENCODING_SET_INLINED((VALUE)fake_str, encidx);

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

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