aboutsummaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-18 15:46:32 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-18 15:46:32 +0000
commita6024cdc1bc1ff792fc07a728e8156c71a891d48 (patch)
tree68951297008ce1658512146db431e0d0b86e7300 /bignum.c
parent07cad43677ec51b1a84cc48b070c2975f71e0431 (diff)
downloadruby-a6024cdc1bc1ff792fc07a728e8156c71a891d48.tar.gz
* numeric.c (rb_num2long): Returns a long.
(rb_num2ulong): Returns a unsigned long. * bignum.c (rb_big2long): Returns a long. (rb_big2ulong): Returns a unsigned long. * include/ruby/intern.h: Follow above changes. * include/ruby/ruby.h: Follow above changes. (rb_num2long_inline): No need to cast. (rb_num2ulong_inline): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bignum.c b/bignum.c
index 83f64263a6..57f6488f62 100644
--- a/bignum.c
+++ b/bignum.c
@@ -4962,7 +4962,7 @@ big2ulong(VALUE x, const char *type)
return num;
}
-VALUE
+unsigned long
rb_big2ulong(VALUE x)
{
unsigned long num = big2ulong(x, "unsigned long");
@@ -4979,7 +4979,7 @@ rb_big2ulong(VALUE x)
rb_raise(rb_eRangeError, "bignum out of range of unsigned long");
}
-SIGNED_VALUE
+long
rb_big2long(VALUE x)
{
unsigned long num = big2ulong(x, "long");