diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2011-03-15 19:22:57 +0100 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2011-03-15 19:22:57 +0100 |
commit | 28697e242e1c742df162196f34531d81e21305a4 (patch) | |
tree | 5f97869d011c525ecc774d1f477dcaac05f72cc8 /gmpxx.h | |
parent | f63f64d3b0b40400d7653f320fbd57548217f136 (diff) | |
download | gmp-28697e242e1c742df162196f34531d81e21305a4.tar.gz |
Make __GMPZ_ULI_LIMBS more preprocessor-friendly.
Diffstat (limited to 'gmpxx.h')
-rw-r--r-- | gmpxx.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -42,8 +42,14 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ // Max allocations for plain types when converted to mpz_t #define __GMPZ_DBL_LIMBS (2 + DBL_MAX_EXP / GMP_NUMB_BITS) -#define __GMPZ_ULI_LIMBS (1 + (8 * sizeof (long) - 1) / GMP_NUMB_BITS) +#if GMP_NAIL_BITS != 0 && ! defined _LONG_LONG_LIMB +#define __GMPZ_ULI_LIMBS 2 +#else +#define __GMPZ_ULI_LIMBS 1 +#endif + +// Fake temporary variables #define __GMPXX_TMPZ_UI \ mpz_t temp; \ mp_limb_t limbs[__GMPZ_ULI_LIMBS]; \ |