summaryrefslogtreecommitdiff
path: root/ext/-test-/bignum/div.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/-test-/bignum/div.c')
-rw-r--r--ext/-test-/bignum/div.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/-test-/bignum/div.c b/ext/-test-/bignum/div.c
index 1706df9..2853ebe 100644
--- a/ext/-test-/bignum/div.c
+++ b/ext/-test-/bignum/div.c
@@ -18,8 +18,19 @@ divrem_normal(VALUE x, VALUE y)
return rb_big_norm(rb_big_divrem_normal(big(x), big(y)));
}
+#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
+static VALUE
+divrem_gmp(VALUE x, VALUE y)
+{
+ return rb_big_norm(rb_big_divrem_gmp(big(x), big(y)));
+}
+#else
+#define divrem_gmp rb_f_notimplement
+#endif
+
void
Init_div(VALUE klass)
{
rb_define_method(rb_cInteger, "big_divrem_normal", divrem_normal, 1);
+ rb_define_method(rb_cInteger, "big_divrem_gmp", divrem_gmp, 1);
}