summaryrefslogtreecommitdiff
path: root/symbol.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-27 06:16:16 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-27 06:16:16 (GMT)
commitfc9fffca1d4f44d740a726db00d9ef3c9cca1312 (patch)
treebdd8ab9566d7fa1be365dc47f78282ddca74b47a /symbol.c
parentce9fc203d1e7cd97d68fab6e10733bd62f065c5a (diff)
symbol.h: optimize ID2SYM
* symbol.h (rb_id2sym): optimize for predefined IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/symbol.c b/symbol.c
index b9d41ef..6512344 100644
--- a/symbol.c
+++ b/symbol.c
@@ -24,9 +24,7 @@
#define SYMBOL_PINNED_P(sym) (RSYMBOL(sym)->id&~ID_SCOPE_MASK)
-#define DYNAMIC_ID_P(id) (!(id&ID_STATIC_SYM)&&id>tLAST_OP_ID)
#define STATIC_SYM2ID(sym) RSHIFT((unsigned long)(sym), RUBY_SPECIAL_SHIFT)
-#define STATIC_ID2SYM(id) (((VALUE)(id)<<RUBY_SPECIAL_SHIFT)|SYMBOL_FLAG)
static ID register_static_symid(ID, const char *, long, rb_encoding *);
static ID register_static_symid_str(ID, VALUE);
@@ -748,6 +746,7 @@ rb_sym2id(VALUE sym)
return id;
}
+#undef rb_id2sym
VALUE
rb_id2sym(ID x)
{