mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
2 changed files with 6 additions and 1 deletions
|
@ -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>
|
||||
|
||||
* io.c (read_all): should use io_read_encoding(), not
|
||||
|
|
|
@ -768,7 +768,7 @@ VALUE rb_id2str(ID);
|
|||
{ \
|
||||
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) \
|
||||
|
|
Loading…
Reference in a new issue