diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-18 15:46:32 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-18 15:46:32 +0000 |
commit | a6024cdc1bc1ff792fc07a728e8156c71a891d48 (patch) | |
tree | 68951297008ce1658512146db431e0d0b86e7300 /include/ruby/ruby.h | |
parent | 07cad43677ec51b1a84cc48b070c2975f71e0431 (diff) | |
download | ruby-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 'include/ruby/ruby.h')
-rw-r--r-- | include/ruby/ruby.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 8de3a43010..54fa9f121d 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -592,15 +592,15 @@ NORETURN(void rb_insecure_operation(void)); VALUE rb_errinfo(void); void rb_set_errinfo(VALUE); -SIGNED_VALUE rb_num2long(VALUE); -VALUE rb_num2ulong(VALUE); +long rb_num2long(VALUE); +unsigned long rb_num2ulong(VALUE); static inline long rb_num2long_inline(VALUE x) { if (FIXNUM_P(x)) return FIX2LONG(x); else - return (long)rb_num2long(x); + return rb_num2long(x); } #define NUM2LONG(x) rb_num2long_inline(x) static inline unsigned long @@ -609,7 +609,7 @@ rb_num2ulong_inline(VALUE x) if (FIXNUM_P(x)) return (unsigned long)FIX2LONG(x); else - return (unsigned long)rb_num2ulong(x); + return rb_num2ulong(x); } #define NUM2ULONG(x) rb_num2ulong_inline(x) #if SIZEOF_INT < SIZEOF_LONG |