[Gmp-commit] /var/hg/gmp: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Sat Dec 3 23:10:05 UTC 2016


details:   /var/hg/gmp/rev/da6f8f010eb5
changeset: 17155:da6f8f010eb5
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Sun Dec 04 00:08:25 2016 +0100
description:
(mpz_clobber): New function.

details:   /var/hg/gmp/rev/cc51eddeb50c
changeset: 17156:cc51eddeb50c
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Sun Dec 04 00:10:03 2016 +0100
description:
Trivial merge.

diffstat:

 ChangeLog     |  6 ++++++
 doc/gmp.texi  |  2 +-
 tests/misc.c  |  8 ++++++++
 tests/tests.h |  1 +
 4 files changed, 16 insertions(+), 1 deletions(-)

diffs (54 lines):

diff -r 8f287aee0205 -r cc51eddeb50c ChangeLog
--- a/ChangeLog	Fri Dec 02 21:06:53 2016 +0100
+++ b/ChangeLog	Sun Dec 04 00:10:03 2016 +0100
@@ -1,3 +1,9 @@
+2016-12-03  Niels Möller  <nisse at lysator.liu.se>
+
+	* doc/gmp.texi (Number Theoretic Functions): Tweak mpz_gcdext
+	documentation. The first and third argument may be NULL, but not
+	the second.
+
 2016-12-02  Niels Möller  <nisse at lysator.liu.se>
 
 	* tests/mpz/reuse.c (main): Test additional cases of reuse for
diff -r 8f287aee0205 -r cc51eddeb50c doc/gmp.texi
--- a/doc/gmp.texi	Fri Dec 02 21:06:53 2016 +0100
+++ b/doc/gmp.texi	Sun Dec 04 00:10:03 2016 +0100
@@ -3624,7 +3624,7 @@
 @GMPabs{@var{b}}}, i.e., if @var{b} divides @var{a} or @math{@var{a} = @var{b}
 = 0}.
 
-If @var{s}, @var{t} or @var{g} is @code{NULL} then that value is not computed.
+If @var{t} or @var{g} is @code{NULL} then that value is not computed.
 @end deftypefun
 
 @deftypefun void mpz_lcm (mpz_t @var{rop}, const mpz_t @var{op1}, const mpz_t @var{op2})
diff -r 8f287aee0205 -r cc51eddeb50c tests/misc.c
--- a/tests/misc.c	Fri Dec 02 21:06:53 2016 +0100
+++ b/tests/misc.c	Sun Dec 04 00:10:03 2016 +0100
@@ -400,6 +400,14 @@
     mpz_neg (rop, rop);
 }
 
+void
+mpz_clobber(mpz_ptr rop)
+{
+  MPN_ZERO(PTR(rop), ALLOC(rop));
+  PTR(rop)[0] = 0xDEADBEEF;
+  SIZ(rop) = 0xDEFACE;
+}
+
 mp_limb_t
 urandom (void)
 {
diff -r 8f287aee0205 -r cc51eddeb50c tests/tests.h
--- a/tests/tests.h	Fri Dec 02 21:06:53 2016 +0100
+++ b/tests/tests.h	Sun Dec 04 00:10:03 2016 +0100
@@ -137,6 +137,7 @@
 int mpz_pow2abs_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE;
 void mpz_set_n (mpz_ptr, mp_srcptr, mp_size_t);
 void mpz_set_str_or_abort (mpz_ptr, const char *, int);
+void mpz_clobber(mpz_ptr);
 
 mp_size_t mpn_diff_highest (mp_srcptr, mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE;
 mp_size_t mpn_diff_lowest (mp_srcptr, mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE;


More information about the gmp-commit mailing list