[Gmp-commit] /var/hg/gmp-5.0: Bring doc and mp_bitcnt_t changes from mainline
mercurial at gmplib.org
mercurial at gmplib.org
Sat Apr 30 14:57:24 CEST 2011
details: /var/hg/gmp-5.0/rev/d7c0e3fd4742
changeset: 13459:d7c0e3fd4742
user: Marc Glisse <marc.glisse at inria.fr>
date: Sat Apr 30 14:57:16 2011 +0200
description:
Bring doc and mp_bitcnt_t changes from mainline
diffstat:
ChangeLog | 12 ++++++++++++
doc/gmp.texi | 40 +++++++++++++++++++++++-----------------
gmp-h.in | 6 +++---
3 files changed, 38 insertions(+), 20 deletions(-)
diffs (143 lines):
diff -r f932f9097eef -r d7c0e3fd4742 ChangeLog
--- a/ChangeLog Sat Apr 30 14:33:26 2011 +0200
+++ b/ChangeLog Sat Apr 30 14:57:16 2011 +0200
@@ -1,3 +1,10 @@
+2011-04-30 Marc Glisse <marc.glisse at inria.fr>
+
+ * gmp-h.in (mpz_cdiv_q_2exp): Use mp_bitcnt_t to match the definition
+ and the documentation.
+ (mpz_remove): Likewise.
+ (mpf_eq): Likewise.
+
2011-04-27 Torbjorn Granlund <tege at gmplib.org>
* tune/speed.h (speed_cyclecounter): Always use PIC variant when
@@ -26,6 +33,11 @@
* tune/powerpc.asm: Use powerpc syntax, not power syntax.
+2011-03-09 Marc Glisse <marc.glisse at inria.fr>
+
+ * doc/gmp.texi: Remove void return type from constructors. Document
+ explicit constructors. Document mpf_class::mpf_class(mpf_t).
+
2011-02-04 Torbjorn Granlund <tege at gmplib.org>
* mpn/x86_64/core2/popcount.asm: Add a MULFUNC_PROLOGUE.
diff -r f932f9097eef -r d7c0e3fd4742 doc/gmp.texi
--- a/doc/gmp.texi Sat Apr 30 14:33:26 2011 +0200
+++ b/doc/gmp.texi Sat Apr 30 14:57:16 2011 +0200
@@ -6511,23 +6511,21 @@
@node C++ Interface Integers, C++ Interface Rationals, C++ Interface General, C++ Class Interface
@section C++ Interface Integers
- at deftypefun void mpz_class::mpz_class (type @var{n})
+ at deftypefun {} mpz_class::mpz_class (type @var{n})
Construct an @code{mpz_class}. All the standard C++ types may be used, except
@code{long long} and @code{long double}, and all the GMP C++ classes can be
used. Any necessary conversion follows the corresponding C function, for
example @code{double} follows @code{mpz_set_d} (@pxref{Assigning Integers}).
@end deftypefun
- at deftypefun void mpz_class::mpz_class (mpz_t @var{z})
+ at deftypefun explicit mpz_class::mpz_class (mpz_t @var{z})
Construct an @code{mpz_class} from an @code{mpz_t}. The value in @var{z} is
copied into the new @code{mpz_class}, there won't be any permanent association
between it and @var{z}.
@end deftypefun
- at deftypefun void mpz_class::mpz_class (const char *@var{s})
- at deftypefunx void mpz_class::mpz_class (const char *@var{s}, int @var{base} = 0)
- at deftypefunx void mpz_class::mpz_class (const string& @var{s})
- at deftypefunx void mpz_class::mpz_class (const string& @var{s}, int @var{base} = 0)
+ at deftypefun explicit mpz_class::mpz_class (const char *@var{s}, int @var{base} = 0)
+ at deftypefunx explicit mpz_class::mpz_class (const string& @var{s}, int @var{base} = 0)
Construct an @code{mpz_class} converted from a string using @code{mpz_set_str}
(@pxref{Assigning Integers}).
@@ -6597,8 +6595,8 @@
In all the following constructors, if a fraction is given then it should be in
canonical form, or if not then @code{mpq_class::canonicalize} called.
- at deftypefun void mpq_class::mpq_class (type @var{op})
- at deftypefunx void mpq_class::mpq_class (integer @var{num}, integer @var{den})
+ at deftypefun {} mpq_class::mpq_class (type @var{op})
+ at deftypefunx {} mpq_class::mpq_class (integer @var{num}, integer @var{den})
Construct an @code{mpq_class}. The initial value can be a single value of any
type, or a pair of integers (@code{mpz_class} or standard C++ integer types)
representing a fraction, except that @code{long long} and @code{long double}
@@ -6611,16 +6609,14 @@
@end example
@end deftypefun
- at deftypefun void mpq_class::mpq_class (mpq_t @var{q})
+ at deftypefun explicit mpq_class::mpq_class (mpq_t @var{q})
Construct an @code{mpq_class} from an @code{mpq_t}. The value in @var{q} is
copied into the new @code{mpq_class}, there won't be any permanent association
between it and @var{q}.
@end deftypefun
- at deftypefun void mpq_class::mpq_class (const char *@var{s})
- at deftypefunx void mpq_class::mpq_class (const char *@var{s}, int @var{base} = 0)
- at deftypefunx void mpq_class::mpq_class (const string& @var{s})
- at deftypefunx void mpq_class::mpq_class (const string& @var{s}, int @var{base} = 0)
+ at deftypefun explicit mpq_class::mpq_class (const char *@var{s}, int @var{base} = 0)
+ at deftypefunx explicit mpq_class::mpq_class (const string& @var{s}, int @var{base} = 0)
Construct an @code{mpq_class} converted from a string using @code{mpq_set_str}
(@pxref{Initializing Rationals}).
@@ -6713,10 +6709,20 @@
@end example
@end deftypefun
- at deftypefun void mpf_class::mpf_class (const char *@var{s})
- at deftypefunx void mpf_class::mpf_class (const char *@var{s}, unsigned long @var{prec}, int @var{base} = 0)
- at deftypefunx void mpf_class::mpf_class (const string& @var{s})
- at deftypefunx void mpf_class::mpf_class (const string& @var{s}, unsigned long @var{prec}, int @var{base} = 0)
+ at deftypefun explicit mpf_class::mpf_class (mpf_t @var{f})
+ at deftypefunx {} mpf_class::mpf_class (mpf_t @var{f}, unsigned long @var{prec})
+Construct an @code{mpf_class} from an @code{mpf_t}. The value in @var{f} is
+copied into the new @code{mpf_class}, there won't be any permanent association
+between it and @var{f}.
+
+If @var{prec} is given, the initial precision is that value, in bits. If
+ at var{prec} is not given, then the initial precision is that of @var{f}.
+ at end deftypefun
+
+ at deftypefun explicit mpf_class::mpf_class (const char *@var{s})
+ at deftypefunx {} mpf_class::mpf_class (const char *@var{s}, unsigned long @var{prec}, int @var{base} = 0)
+ at deftypefunx explicit mpf_class::mpf_class (const string& @var{s})
+ at deftypefunx {} mpf_class::mpf_class (const string& @var{s}, unsigned long @var{prec}, int @var{base} = 0)
Construct an @code{mpf_class} converted from a string using @code{mpf_set_str}
(@pxref{Assigning Floats}). If @var{prec} is given, the initial precision is
that value, in bits. If not, the default @code{mpf} precision
diff -r f932f9097eef -r d7c0e3fd4742 gmp-h.in
--- a/gmp-h.in Sat Apr 30 14:33:26 2011 +0200
+++ b/gmp-h.in Sat Apr 30 14:57:16 2011 +0200
@@ -720,7 +720,7 @@
__GMP_DECLSPEC void mpz_cdiv_q __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr));
#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp
-__GMP_DECLSPEC void mpz_cdiv_q_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long));
+__GMP_DECLSPEC void mpz_cdiv_q_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t));
#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui
__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int));
@@ -1053,7 +1053,7 @@
__GMP_DECLSPEC void mpz_realloc2 __GMP_PROTO ((mpz_ptr, mp_bitcnt_t));
#define mpz_remove __gmpz_remove
-__GMP_DECLSPEC unsigned long int mpz_remove __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr));
+__GMP_DECLSPEC mp_bitcnt_t mpz_remove __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr));
#define mpz_root __gmpz_root
__GMP_DECLSPEC int mpz_root __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int));
@@ -1329,7 +1329,7 @@
__GMP_DECLSPEC void mpf_dump __GMP_PROTO ((mpf_srcptr));
#define mpf_eq __gmpf_eq
-__GMP_DECLSPEC int mpf_eq __GMP_PROTO ((mpf_srcptr, mpf_srcptr, unsigned long int)) __GMP_ATTRIBUTE_PURE;
+__GMP_DECLSPEC int mpf_eq __GMP_PROTO ((mpf_srcptr, mpf_srcptr, mp_bitcnt_t)) __GMP_ATTRIBUTE_PURE;
#define mpf_fits_sint_p __gmpf_fits_sint_p
__GMP_DECLSPEC int mpf_fits_sint_p __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE;
More information about the gmp-commit
mailing list