summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-19 04:32:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-19 04:32:52 +0000
commit6839d47eb88a839155db263b6d262b1e5a6a2406 (patch)
tree02969d192245bbaa2c5650ee0a0b31312d728e49 /bignum.c
parent5f03f753eefcff619b8792c52a4a6735bd626282 (diff)
ruby.h: rb_big_sign
* include/ruby/ruby.h (RBIGNUM_SIGN): use a wrapper function to return the sign bit, instead of comparing with 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index c0847e620d..bf234dba6a 100644
--- a/bignum.c
+++ b/bignum.c
@@ -6691,6 +6691,12 @@ rb_big_abs(VALUE x)
return x;
}
+int
+rb_big_sign(VALUE x)
+{
+ return BIGNUM_SIGN(x);
+}
+
size_t
rb_big_size(VALUE big)
{