summaryrefslogtreecommitdiff
path: root/include/ruby/ruby.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-07 12:40:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-07 12:40:34 +0000
commitd250a330625879bd6da45e98061d8407b96ec900 (patch)
tree787f627c344d785f190186d9b0ff4bc0aae29809 /include/ruby/ruby.h
parent89dde224d4c46ec0fdd2cb1f44e77044b81d7a41 (diff)
ruby.h: RB_OBJ_FROZEN_RAW
* include/ruby/ruby.h (RB_OBJ_FROZEN_RAW): split from RB_OBJ_FROZEN. valid only for non-special-const objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r--include/ruby/ruby.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index cdb87a7fe6..ac90cf1c2f 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1312,7 +1312,8 @@ struct RStruct {
(RB_OBJ_TAINTABLE(x) && RB_FL_ABLE(s)) ? \
RB_OBJ_INFECT_RAW(x, s) : 0)
-#define RB_OBJ_FROZEN(x) (RB_FL_ABLE(x) ? !!(RBASIC(x)->flags&RUBY_FL_FREEZE) : 1)
+#define RB_OBJ_FROZEN_RAW(x) (RBASIC(x)->flags&RUBY_FL_FREEZE)
+#define RB_OBJ_FROZEN(x) (!RB_FL_ABLE(x) || RB_OBJ_FROZEN_RAW(x))
#define RB_OBJ_FREEZE_RAW(x) (RBASIC(x)->flags |= RUBY_FL_FREEZE)
#define RB_OBJ_FREEZE(x) rb_obj_freeze_inline((VALUE)x)
@@ -1339,6 +1340,7 @@ struct RStruct {
#define OBJ_UNTRUST(x) RB_OBJ_UNTRUST(x)
#define OBJ_INFECT_RAW(x,s) RB_OBJ_INFECT_RAW(x,s)
#define OBJ_INFECT(x,s) RB_OBJ_INFECT(x,s)
+#define OBJ_FROZEN_RAW(x) RB_OBJ_FROZEN_RAW(x)
#define OBJ_FROZEN(x) RB_OBJ_FROZEN(x)
#define OBJ_FREEZE_RAW(x) RB_OBJ_FREEZE_RAW(x)
#define OBJ_FREEZE(x) RB_OBJ_FREEZE(x)