aboutsummaryrefslogtreecommitdiffstats
path: root/symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/symbol.c b/symbol.c
index 060a54b899..99c7512332 100644
--- a/symbol.c
+++ b/symbol.c
@@ -18,6 +18,13 @@
#include "gc.h"
#include "probes.h"
+#define SYMBOL_PINNED FL_USER1
+#define SYMBOL_PINNED_P(sym) FL_TEST((sym), SYMBOL_PINNED)
+
+#define ID_DYNAMIC_SYM_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);
#define REGISTER_SYMID(id, name) register_static_symid((id), (name), strlen(name), enc)