mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
5b0ccdbc67
commit
6016da7dab
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
4
symbol.h
4
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)
|
||||
|
|
Loading…
Reference in a new issue