* include/ruby/ruby.h (rb_intern): use rb_intern2 with strlen for
constant symbols to optimize strlen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
53f0a8ade1
commit
69fa5eea6a
@ -1,3 +1,8 @@
|
|||||||
|
Thu Jun 12 13:36:54 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* 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@ruby-lang.org>
|
Thu Jun 12 08:47:51 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (read_all): should use io_read_encoding(), not
|
* io.c (read_all): should use io_read_encoding(), not
|
||||||
|
@ -768,7 +768,7 @@ VALUE rb_id2str(ID);
|
|||||||
{ \
|
{ \
|
||||||
static ID rb_intern_id_cache; \
|
static ID rb_intern_id_cache; \
|
||||||
if (!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; \
|
result rb_intern_id_cache; \
|
||||||
}
|
}
|
||||||
#define CONST_ID(var, str) \
|
#define CONST_ID(var, str) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user