[commit: integer-gmp] master: Use CLong, not CInt, for mp_bitcnt_t value; fixes #5965 (5dfb7d3)
Ian Lynagh
igloo at earth.li
Wed Jun 20 19:06:39 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/integer-gmp
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/5dfb7d3ca63790dd4b5947b2abc30cfa8b7c5a57
>---------------------------------------------------------------
commit 5dfb7d3ca63790dd4b5947b2abc30cfa8b7c5a57
Author: Ian Lynagh <igloo at earth.li>
Date: Wed Jun 20 14:28:36 2012 +0100
Use CLong, not CInt, for mp_bitcnt_t value; fixes #5965
The GMP docs say:
Counts of bits of a multi-precision number are represented in the C
type mp_bitcnt_t. Currently this is always an unsigned long, but on
some systems it will be an unsigned long long in the future.
>---------------------------------------------------------------
cbits/gmp-wrappers.cmm | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cbits/gmp-wrappers.cmm b/cbits/gmp-wrappers.cmm
index 145e6de..9ea19c1 100644
--- a/cbits/gmp-wrappers.cmm
+++ b/cbits/gmp-wrappers.cmm
@@ -269,7 +269,7 @@ name \
{ \
CInt s1; \
W_ d1; \
- CInt ul; \
+ CLong ul; \
W_ mp_tmp; \
W_ mp_result; \
\
@@ -280,7 +280,7 @@ name \
\
s1 = W_TO_INT(R1); \
d1 = R2; \
- ul = W_TO_INT(R3); \
+ ul = W_TO_LONG(R3); \
\
mp_tmp = Sp - 1 * SIZEOF_MP_INT; \
mp_result = Sp - 2 * SIZEOF_MP_INT; \
More information about the Cvs-libraries
mailing list