summaryrefslogtreecommitdiff
path: root/Build/source/libs/gmp/gmp-src/mpz/iset_d.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/gmp/gmp-src/mpz/iset_d.c')
-rw-r--r--Build/source/libs/gmp/gmp-src/mpz/iset_d.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Build/source/libs/gmp/gmp-src/mpz/iset_d.c b/Build/source/libs/gmp/gmp-src/mpz/iset_d.c
index 2c5b23ab9c9..5d04a6fd9e6 100644
--- a/Build/source/libs/gmp/gmp-src/mpz/iset_d.c
+++ b/Build/source/libs/gmp/gmp-src/mpz/iset_d.c
@@ -1,7 +1,7 @@
/* mpz_init_set_d(integer, val) -- Initialize and assign INTEGER with a double
value VAL.
-Copyright 1996, 2000, 2001, 2012 Free Software Foundation, Inc.
+Copyright 1996, 2000, 2001, 2012, 2015 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -29,14 +29,15 @@ You should have received copies of the GNU General Public License and the
GNU Lesser General Public License along with the GNU MP Library. If not,
see https://www.gnu.org/licenses/. */
-#include "gmp.h"
#include "gmp-impl.h"
void
mpz_init_set_d (mpz_ptr dest, double val)
{
- ALLOC (dest) = 1;
- PTR (dest) = __GMP_ALLOCATE_FUNC_LIMBS (1);
+ static const mp_limb_t dummy_limb=0xc1a0;
+
+ ALLOC (dest) = 0;
SIZ (dest) = 0;
+ PTR (dest) = (mp_ptr) &dummy_limb;
mpz_set_d (dest, val);
}