summaryrefslogtreecommitdiffstats
path: root/ruby.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-30 13:28:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-30 13:28:10 +0000
commitf1a769b87a5ebed50f7ea7df1051125eb20cf08a (patch)
tree1232d8d143fa078d57f8da0fcf53ec8dc06243e7 /ruby.h
parent89146e0f644fdd65a1e1ea7c3eef6a7ec98b9e13 (diff)
downloadruby-f1a769b87a5ebed50f7ea7df1051125eb20cf08a.tar.gz
ruby-f1a769b87a5ebed50f7ea7df1051125eb20cf08a.tar.xz
ruby-f1a769b87a5ebed50f7ea7df1051125eb20cf08a.zip
* numeric.c (rb_num2uint, rb_fix2int): new function to convert
values over INT_MAX. [ruby-core:01099] * ruby.h (NUM2UINT, FIX2INT): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/ruby.h b/ruby.h
index 41d89beb8..76ea5d8b7 100644
--- a/ruby.h
+++ b/ruby.h
@@ -241,8 +241,10 @@ int rb_num2int _((VALUE));
#define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))
int rb_fix2int _((VALUE));
#define FIX2INT(x) rb_fix2int((VALUE)x)
-#define NUM2UINT(x) ((unsigned int)NUM2INT(x))
-#define FIX2UINT(x) ((unsigned int)FIX2INT(x))
+unsigned int rb_num2uint _((VALUE));
+#define NUM2UINT(x) rb_num2uint(x)
+unsigned int rb_fix2uint _((VALUE));
+#define FIX2UINT(x) rb_fix2uint(x)
#else
#define NUM2INT(x) ((int)NUM2LONG(x))
#define NUM2UINT(x) ((unsigned int)NUM2ULONG(x))