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

ruby-changes:39989

From: nobu <ko1@a...>
Date: Wed, 7 Oct 2015 17:30:48 +0900 (JST)
Subject: [ruby-changes:39989] nobu:r52070 (trunk): string.c: use raw macro

nobu	2015-10-07 17:30:20 +0900 (Wed, 07 Oct 2015)

  New Revision: 52070

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

  Log:
    string.c: use raw macro
    
    * string.c (str_new_frozen): use raw macro for RString object.

  Modified files:
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 52069)
+++ string.c	(revision 52070)
@@ -1025,7 +1025,7 @@ str_new_frozen(VALUE klass, VALUE orig) https://github.com/ruby/ruby/blob/trunk/string.c#L1025
 	str = str_new(klass, RSTRING_PTR(orig), RSTRING_LEN(orig));
     }
     else {
-	if (FL_TEST(orig, STR_SHARED)) {
+	if (FL_TEST_RAW(orig, STR_SHARED)) {
 	    VALUE shared = RSTRING(orig)->as.heap.aux.shared;
 	    long ofs = RSTRING(orig)->as.heap.ptr - RSTRING(shared)->as.heap.ptr;
 	    long rest = RSTRING(shared)->as.heap.len - ofs - RSTRING(orig)->as.heap.len;

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

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