[Patches] Patch to src/Modules/mpzmodule.c
Andrew M. Kuchling
akuchlin@mems-exchange.org
Thu, 24 Feb 2000 14:00:38 -0500 (EST)
Peter Funk writes:
>Hi!
>1996). The only older version I could find, was a May 21 1993
>gmp-1.3.2.tar.gz, which didn't contain an 'gmp-mparam.h' file either.
Verified. I expect mpzmodule.c is very old; the copy in Python 1.2
from 1995 is substantially the same as the one in 1.5, the changes
being mostly API renamings (INCREF -> Py_INCREF, object -> PyObject,
etc.). Presumably it was written when GMP 1.3.2 was still widely
deployed, and therefore it contains compatibility code for both
versions. Now that it's 2000, we can safely assume everyone will use
GMP 2, and the compatibility code could be dropped. (Though GvR might
be inclined to just drop the module...)
> #if defined __GNU_MP__ && __GNU_MP__ >= 2
> #define BITS_PER_MP_LIMB mp_bits_per_limb
> #else
> #include "gmp-mparam.h"
> #endif
Guido, want me to check this fix in, after I've actually tried it out?
--
A.M. Kuchling http://starship.python.net/crew/amk/
"I thought you could foretell the future?"
"I don't need to know the future. When the future's over, then it's me..."
-- Orpheus and Death, in SANDMAN: "The Song of Orpheus"