[Gmp-commit] /var/hg/gmp: gmp-impl.h (_mpz_newalloc, log_n_max): mark with in...

mercurial at gmplib.org mercurial at gmplib.org
Sun Aug 12 23:53:00 CEST 2012


details:   /var/hg/gmp/rev/5eb5cd992d7a
changeset: 15077:5eb5cd992d7a
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Aug 12 23:52:51 2012 +0200
description:
gmp-impl.h (_mpz_newalloc, log_n_max): mark with inline (spotted by Niels)

diffstat:

 ChangeLog  |  2 ++
 gmp-impl.h |  4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 80a1f1343782 -r 5eb5cd992d7a ChangeLog
--- a/ChangeLog	Mon Aug 06 20:33:16 2012 +0200
+++ b/ChangeLog	Sun Aug 12 23:52:51 2012 +0200
@@ -2,6 +2,8 @@
 
 	* doc/gmp.texi (mpn_neg): Correctly document returned type.
 
+	* gmp-impl.h (_mpz_newalloc, log_n_max): mark with inline (spotted by Niels).
+
 2012-07-28  Marc Glisse  <marc.glisse at inria.fr>
 
 	* gmpxx.h (std::common_type): New partial specializations with builtin
diff -r 80a1f1343782 -r 5eb5cd992d7a gmp-impl.h
--- a/gmp-impl.h	Mon Aug 06 20:33:16 2012 +0200
+++ b/gmp-impl.h	Sun Aug 12 23:52:51 2012 +0200
@@ -1881,7 +1881,7 @@
   } while (0)
 
 #if WANT_ASSERT
-static void *
+static inline void *
 _mpz_newalloc (mpz_ptr z, mp_size_t n)
 {
   void * res = _mpz_realloc(z,n);
@@ -1942,7 +1942,7 @@
 extern const mp_limb_t __gmp_limbroots_table[];
 
 /* n^log <= GMP_NUMB_MAX, a limb can store log factors less than n */
-static unsigned
+static inline unsigned
 log_n_max (mp_limb_t n)
 {
   unsigned log;


More information about the gmp-commit mailing list