* bignum.c (GMP_BIG2STR_DIGITS): New constant.

(big2str_gmp): New function.
  (rb_big2str1): Use big2str_gmp for big bignums.

* internal.h (rb_big2str_gmp): Declared.

* ext/-test-/bignum/big2str.c (big2str_gmp): New method.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-09-01 14:34:53 +00:00
parent 4dd7a13a0a
commit b64c2c348f
4 changed files with 83 additions and 3 deletions

View file

@ -644,12 +644,13 @@ VALUE rb_big_mul_normal(VALUE x, VALUE y);
VALUE rb_big_mul_balance(VALUE x, VALUE y);
VALUE rb_big_mul_karatsuba(VALUE x, VALUE y);
VALUE rb_big_mul_toom3(VALUE x, VALUE y);
#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
VALUE rb_big_mul_gmp(VALUE x, VALUE y);
#endif
VALUE rb_big_sq_fast(VALUE x);
VALUE rb_big2str_poweroftwo(VALUE x, int base);
VALUE rb_big2str_generic(VALUE x, int base);
#if defined(HAVE_LIBGMP) && defined(HAVE_GMP_H)
VALUE rb_big_mul_gmp(VALUE x, VALUE y);
VALUE rb_big2str_gmp(VALUE x, int base);
#endif
/* file.c */
#ifdef __APPLE__