Richard Fish <rfish@users.sourceforge.net>:
Fix the .binary() method of mpz objects for 64-bit systems. [Also removed a lot of trailing whitespace elsewhere in the file. --FLD] This closes SF patch #103547.
This commit is contained in:
parent
26d813e42c
commit
c17b3cfec1
|
@ -1477,6 +1477,12 @@ mpz_binary(mpzobject *self, PyObject *args)
|
|||
*cp++ = (unsigned char)((ldigit >>= 8) & 0xFF);
|
||||
*cp++ = (unsigned char)((ldigit >>= 8) & 0xFF);
|
||||
*cp++ = (unsigned char)((ldigit >>= 8) & 0xFF);
|
||||
if (sizeof(ldigit) == 8 && BITS_PER_MP_LIMB == 64) {
|
||||
*cp++ = (unsigned char)((ldigit >>= 8) & 0xFF);
|
||||
*cp++ = (unsigned char)((ldigit >>= 8) & 0xFF);
|
||||
*cp++ = (unsigned char)((ldigit >>= 8) & 0xFF);
|
||||
*cp++ = (unsigned char)((ldigit >>= 8) & 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
while (strobjp->ob_size && !*--cp)
|
||||
|
|
Loading…
Reference in New Issue