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

ruby-changes:32850

From: normal <ko1@a...>
Date: Thu, 13 Feb 2014 18:36:44 +0900 (JST)
Subject: [ruby-changes:32850] normal:r44929 (trunk): re.c (rb_reg_regcomp): remove volatile

normal	2014-02-13 18:36:40 +0900 (Thu, 13 Feb 2014)

  New Revision: 44929

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

  Log:
    re.c (rb_reg_regcomp): remove volatile
    
    * re.c (rb_reg_regcomp): remove volatile
      Unnecessary since r13261

  Modified files:
    trunk/ChangeLog
    trunk/re.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44928)
+++ ChangeLog	(revision 44929)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Feb 13 18:28:51 2014  Eric Wong  <e@8...>
+
+	* re.c (rb_reg_regcomp): remove volatile
+	  Unnecessary since r13261
+
 Thu Feb 13 16:54:32 2014  Zachary Scott  <e@z...>
 
 	* test/ruby/test_array.rb: Ensure flatten! is used for test_flatten
Index: re.c
===================================================================
--- re.c	(revision 44928)
+++ re.c	(revision 44929)
@@ -2569,13 +2569,12 @@ static VALUE reg_cache; https://github.com/ruby/ruby/blob/trunk/re.c#L2569
 VALUE
 rb_reg_regcomp(VALUE str)
 {
-    volatile VALUE save_str = str;
     if (reg_cache && RREGEXP_SRC_LEN(reg_cache) == RSTRING_LEN(str)
 	&& ENCODING_GET(reg_cache) == ENCODING_GET(str)
 	&& memcmp(RREGEXP_SRC_PTR(reg_cache), RSTRING_PTR(str), RSTRING_LEN(str)) == 0)
 	return reg_cache;
 
-    return reg_cache = rb_reg_new_str(save_str, 0);
+    return reg_cache = rb_reg_new_str(str, 0);
 }
 
 static st_index_t reg_hash(VALUE re);

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

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