[Gmp-commit] /var/hg/gmp: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Wed Nov 4 18:24:56 UTC 2015
details: /var/hg/gmp/rev/ac45165bc0e0
changeset: 16936:ac45165bc0e0
user: Torbjorn Granlund <torbjorng at google.com>
date: Wed Nov 04 19:23:35 2015 +0100
description:
Use MPZ_REALLOC.
details: /var/hg/gmp/rev/5586e38395fc
changeset: 16937:5586e38395fc
user: Torbjorn Granlund <torbjorng at google.com>
date: Wed Nov 04 19:24:35 2015 +0100
description:
ChangeLog
diffstat:
ChangeLog | 5 +++++
mpz/ior.c | 2 +-
mpz/xor.c | 7 +++----
3 files changed, 9 insertions(+), 5 deletions(-)
diffs (57 lines):
diff -r 7914481e1f6a -r 5586e38395fc ChangeLog
--- a/ChangeLog Wed Nov 04 17:08:43 2015 +0100
+++ b/ChangeLog Wed Nov 04 19:24:35 2015 +0100
@@ -1,3 +1,8 @@
+2015-11-04 Torbjörn Granlund <torbjorng at google.com>
+
+ * mpz/xor.c: Use MPZ_REALLOC.
+ * mpz/ior.c: Likewise
+
2015-11-03 Marco Bodrato <bodrato at mail.dm.unipi.it>
* mpz/ior.c, mpz/xor.x: Use the return value of _mpz_realloc.
diff -r 7914481e1f6a -r 5586e38395fc mpz/ior.c
--- a/mpz/ior.c Wed Nov 04 17:08:43 2015 +0100
+++ b/mpz/ior.c Wed Nov 04 19:24:35 2015 +0100
@@ -178,7 +178,7 @@
if (ALLOC(res) < res_alloc)
{
- res_ptr = (mp_ptr) _mpz_realloc (res, res_alloc);
+ res_ptr = MPZ_REALLOC (res, res_alloc);
op1_ptr = PTR(op1);
/* op2_ptr points to temporary space. */
}
diff -r 7914481e1f6a -r 5586e38395fc mpz/xor.c
--- a/mpz/xor.c Wed Nov 04 17:08:43 2015 +0100
+++ b/mpz/xor.c Wed Nov 04 19:24:35 2015 +0100
@@ -57,7 +57,7 @@
{
if (ALLOC(res) < op1_size)
{
- res_ptr = (mp_ptr) _mpz_realloc (res, op1_size);
+ res_ptr = MPZ_REALLOC (res, op1_size);
/* No overlapping possible: op1_ptr = PTR(op1); */
op2_ptr = PTR(op2);
}
@@ -73,7 +73,7 @@
{
if (ALLOC(res) < op2_size)
{
- res_ptr = (mp_ptr) _mpz_realloc (res, op2_size);
+ res_ptr = MPZ_REALLOC (res, op2_size);
op1_ptr = PTR(op1);
/* No overlapping possible: op2_ptr = PTR(op2); */
}
@@ -161,10 +161,9 @@
res_alloc = MAX (op1_size, op2_size) + 1;
if (ALLOC(res) < res_alloc)
{
- _mpz_realloc (res, res_alloc);
+ res_ptr = MPZ_REALLOC (res, res_alloc);
op1_ptr = PTR(op1);
/* op2_ptr points to temporary space. */
- res_ptr = PTR(res);
}
if (op1_size > op2_size)
More information about the gmp-commit
mailing list