path: root/ruby.h
diff options
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-26 00:05:58 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-26 00:05:58 +0000
commit4ce57dd4bcdc2218658b7104a91969a0f3380474 (patch)
tree60c62d528e3a7d5bf31cc66e038159ee6109da2b /ruby.h
parent458ce150cdaa85b074c49f232e303c4a4d57b3c1 (diff)
* ruby.h (Qfalse, Qtrue, Qnil, Qundef): make sure these immediate
values have VALUE type. there is an environment where sizeof(VALUE) != sizeof(int) like IA64. if 32bit integer (Qtrue) is passed to ANYARGS and received by 64bit integer (VALUE), upper bits may have garbage value. [ruby-dev:27513] git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
1 files changed, 4 insertions, 4 deletions
diff --git a/ruby.h b/ruby.h
index 1c8e07b..37e84b6 100644
--- a/ruby.h
+++ b/ruby.h
@@ -170,10 +170,10 @@ VALUE rb_ull2inum _((unsigned LONG_LONG));
#define SYM2ID(x) RSHIFT((long)x,8)
/* special contants - i.e. non-zero and non-fixnum constants */
-#define Qfalse 0
-#define Qtrue 2
-#define Qnil 4
-#define Qundef 6 /* undefined value for placeholder */
+#define Qfalse ((VALUE)0)
+#define Qtrue ((VALUE)2)
+#define Qnil ((VALUE)4)
+#define Qundef ((VALUE)6) /* undefined value for placeholder */
#define RTEST(v) (((VALUE)(v) & ~Qnil) != 0)
#define NIL_P(v) ((VALUE)(v) == Qnil)