summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-01 13:38:49 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-01 13:38:49 +0000
commit4dd7a13a0a00d66592049e1f9a79a9cfddf11a07 (patch)
treeb0130e21cd8d929815aa4b7095e0de1de2de36e0 /bignum.c
parent28130c1c63a4b1cbcc05f11ef84cd414685c3b6c (diff)
* bignum.c (bary_mul_gmp): Use mpz_init and mpz_clear instead of
mpz_inits and mpz_clears. Older GMP don't have them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bignum.c b/bignum.c
index 971678b3d3e..7a6e1f29341 100644
--- a/bignum.c
+++ b/bignum.c
@@ -2262,7 +2262,9 @@ bary_mul_gmp(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT
assert(xn + yn <= zn);
- mpz_inits(x, y, z, 0);
+ mpz_init(x);
+ mpz_init(y);
+ mpz_init(z);
mpz_import(x, xn, -1, sizeof(BDIGIT), 0, nails, xds);
if (xds == yds && xn == yn) {
mpz_mul(z, x, x);
@@ -2273,7 +2275,9 @@ bary_mul_gmp(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, const BDIGIT
}
mpz_export (zds, &count, -1, sizeof(BDIGIT), 0, nails, z);
BDIGITS_ZERO(zds+count, zn-count);
- mpz_clears(x, y, z, 0);
+ mpz_clear(x);
+ mpz_clear(y);
+ mpz_clear(z);
}
VALUE