summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-01 03:12:21 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-01 03:12:21 +0000
commite4b53b22228d935847b72e8f9ab0f49a15b54215 (patch)
treeae6cd78921bf626d54145b5485474bf59c3dceb4 /ruby.h
parent005f12582975d8382851b740690f97dba35aaa2a (diff)
2000-02-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/ruby.h b/ruby.h
index a5c9e39..4d307c5 100644
--- a/ruby.h
+++ b/ruby.h
@@ -160,11 +160,11 @@ VALUE rb_uint2inum _((unsigned long));
#define T_DATA 0x22
#define T_MATCH 0x23
-#define T_VARMAP 0x7d
-#define T_SCOPE 0x7e
-#define T_NODE 0x7f
+#define T_VARMAP 0x3d
+#define T_SCOPE 0x3e
+#define T_NODE 0x3f
-#define T_MASK 0x7f
+#define T_MASK 0x3f
#define BUILTIN_TYPE(x) (((struct RBasic*)(x))->flags & T_MASK)
@@ -176,6 +176,10 @@ void rb_check_safe_str _((VALUE));
#define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
void rb_secure _((int));
+extern int ruby_safe_level;
+#define rb_safe_level() (ruby_safe_level)
+void rb_set_safe_level _((int));
+
long rb_num2long _((VALUE));
unsigned long rb_num2ulong _((VALUE));
#define NUM2LONG(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2long((VALUE)x))
@@ -326,10 +330,11 @@ struct RBignum {
#define RFILE(obj) (R_CAST(RFile)(obj))
#define FL_SINGLETON FL_USER0
-#define FL_MARK (1<<7)
-#define FL_FINALIZE (1<<8)
-#define FL_TAINT (1<<9)
-#define FL_EXIVAR (1<<10)
+#define FL_MARK (1<<6)
+#define FL_FINALIZE (1<<7)
+#define FL_TAINT (1<<8)
+#define FL_EXIVAR (1<<9)
+#define FL_FREEZE (1<<10)
#define FL_USHIFT 11
@@ -356,6 +361,9 @@ struct RBignum {
#define OBJ_TAINT(x) FL_SET((x), FL_TAINT)
#define OBJ_INFECT(x,s) (FL_ABLE(x) && FL_ABLE(s) && (RBASIC(x)->flags |= RBASIC(s)->flags & FL_TAINT))
+#define OBJ_FROZEN(x) FL_TEST((x), FL_FREEZE)
+#define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE)
+
void *xmalloc _((size_t));
void *xcalloc _((size_t,size_t));
void *xrealloc _((void*,size_t));
@@ -417,9 +425,6 @@ VALUE rb_equal _((VALUE,VALUE));
EXTERN VALUE ruby_verbose, ruby_debug;
-int rb_safe_level _((void));
-void rb_set_safe_level _((int));
-
void rb_raise __((VALUE, const char*, ...)) NORETURN;
void rb_fatal __((const char*, ...)) NORETURN;
void rb_bug __((const char*, ...)) NORETURN;