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

ruby-changes:5599

From: akr <ko1@a...>
Date: Thu, 12 Jun 2008 13:47:30 +0900 (JST)
Subject: [ruby-changes:5599] Ruby:r17105 (trunk): * include/ruby/ruby.h (rb_intern): use rb_intern2 with strlen for

akr	2008-06-12 13:46:16 +0900 (Thu, 12 Jun 2008)

  New Revision: 17105

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/ruby.h

  Log:
    * include/ruby/ruby.h (rb_intern): use rb_intern2 with strlen for
      constant symbols to optimize strlen.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/ruby.h?r1=17105&r2=17104&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17105&r2=17104&diff_format=u

Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 17104)
+++ include/ruby/ruby.h	(revision 17105)
@@ -768,7 +768,7 @@
     {							\
 	static ID rb_intern_id_cache;			\
 	if (!rb_intern_id_cache)			\
-	    rb_intern_id_cache = (rb_intern)(str);	\
+	    rb_intern_id_cache = rb_intern2(str, strlen(str));	\
 	result rb_intern_id_cache;			\
     }
 #define CONST_ID(var, str) \
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 17104)
+++ ChangeLog	(revision 17105)
@@ -1,3 +1,8 @@
+Thu Jun 12 13:36:54 2008  Tanaka Akira  <akr@f...>
+
+	* include/ruby/ruby.h (rb_intern): use rb_intern2 with strlen for
+	  constant symbols to optimize strlen.
+
 Thu Jun 12 08:47:51 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* io.c (read_all): should use io_read_encoding(), not

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

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