summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index d2f5ea3040..f2853ebe7b 100644
--- a/bignum.c
+++ b/bignum.c
@@ -53,6 +53,12 @@ bigzero_p(VALUE x)
}
int
+rb_bigzero_p(VALUE x)
+{
+ return BIGZEROP(x);
+}
+
+int
rb_cmpint(VALUE val, VALUE a, VALUE b)
{
if (NIL_P(val)) {
@@ -143,6 +149,12 @@ bignew_1(VALUE klass, long len, int sign)
#define bignew(len,sign) bignew_1(rb_cBignum,len,sign)
VALUE
+rb_big_new(long len, int sign)
+{
+ return bignew(len, sign != 0);
+}
+
+VALUE
rb_big_clone(VALUE x)
{
VALUE z = bignew_1(CLASS_OF(x), RBIGNUM_LEN(x), RBIGNUM_SIGN(x));