summaryrefslogtreecommitdiff
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
commit045eb9773e37dbe31c5ff595d380beb71ac62863 (patch)
tree1232d8d143fa078d57f8da0fcf53ec8dc06243e7 /ruby.h
parent7d9628ef0200936d1deb0ab866a006a94fe00d91 (diff)
* 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: svn+ssh://ci.ruby-lang.org/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 41d89be..76ea5d8 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))