aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/alloc.c b/src/alloc.c
index edfb87e5cdd..1504d7912b3 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3874,12 +3874,12 @@ mpz_set_uintmax_slow (mpz_t result, uintmax_t v)
3874{ 3874{
3875 /* If long is larger then a faster path is taken. */ 3875 /* If long is larger then a faster path is taken. */
3876 eassert (sizeof (uintmax_t) > sizeof (unsigned long)); 3876 eassert (sizeof (uintmax_t) > sizeof (unsigned long));
3877 /* This restriction could be lifted if needed. */
3878 eassert (sizeof (uintmax_t) <= 2 * sizeof (unsigned long));
3879 3877
3880 mpz_set_ui (result, v >> (CHAR_BIT * sizeof (unsigned long))); 3878 /* COUNT = 1 means just a single word of the given size. ORDER = -1
3881 mpz_mul_2exp (result, result, CHAR_BIT * sizeof (unsigned long)); 3879 is arbitrary since there's only a single word. ENDIAN = 0 means
3882 mpz_add_ui (result, result, v & -1ul); 3880 use the native endian-ness. NAILS = 0 means use the whole
3881 word. */
3882 mpz_import (result, 1, -1, sizeof (uintmax_t), 0, 0, &v);
3883} 3883}
3884 3884
3885 3885