summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-31 09:58:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-31 09:58:01 +0000
commit6016da7dab6b1168ffd332d2285e367020aee5ee (patch)
tree03623db7dc9ea51bdc880549cdfa69e79c70cd6a
parent5b0ccdbc679158cc944907a8648bba9ac3277e40 (diff)
downloadruby-6016da7dab6b1168ffd332d2285e367020aee5ee.tar.gz
symbol.h: move macros
* symbol.h (RSYMBOL): move macros for Symbol from internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--internal.h4
-rw-r--r--symbol.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/internal.h b/internal.h
index 4a5134d20a..1cea556a2d 100644
--- a/internal.h
+++ b/internal.h
@@ -418,10 +418,6 @@ struct RSymbol {
ID type;
};
-#define RSYMBOL(obj) (R_CAST(RSymbol)(obj))
-#define SYMBOL_PINNED FL_USER1
-#define SYMBOL_PINNED_P(sym) FL_TEST((sym), SYMBOL_PINNED)
-
struct RFloat {
struct RBasic basic;
double float_value;
diff --git a/symbol.h b/symbol.h
index 809ecac459..aeffa9759c 100644
--- a/symbol.h
+++ b/symbol.h
@@ -14,6 +14,10 @@
#include "id.h"
+#define RSYMBOL(obj) (R_CAST(RSymbol)(obj))
+#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)