[Python-bugs-list] [ python-Bugs-493631 ] Problem with mpz module (gmp4)

noreply@sourceforge.net noreply@sourceforge.net
Sat, 15 Dec 2001 08:08:24 -0800


Bugs item #493631, was opened at 2001-12-15 04:17
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=493631&group_id=5470

Category: Extension Modules
Group: Python 2.2
Status: Open
Resolution: None
Priority: 7
Submitted By: Damien Wyart (chlick)
Assigned to: Nobody/Anonymous (nobody)
Summary: Problem with mpz module (gmp4)

Initial Comment:
Trying to compile latest Python-2.2 (rc1), I found
the following problem : I can't compile mpzmodule.c
without modifying it.

I use gcc-3.0.2 and gmp-4.0. I am not a gmp not a
Python expert, but the problems seems to come
mainly from lack of clear support of gmp-4 in
mpzmodule.c.

MPZ_GET_STR_BUG is obsolete now, and should not be
used with gmp-4. #ifdef cases with 
MPZ_GET_STR_BUG defined uses obsolete struct field
calls and leads to compilation problems.

In fact, gmp-mparam.h should be included in all cases
(not only when MPZ_GET_STR_BUG defined), and the whole
file should be cleaned a bit to fully support gmp4.
including longlong.h is not necessary.

For now, there are two alternatives : gmp is gmp-2 and
is really bogus, or gmp is not 2 and is bogus with
respect to MPZ_GET_STR_BUG. The alternative "gmp-4"
(not bogus) should be added.

----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-15 08:08

Message:
Logged In: YES 
user_id=6380

I'm afraid we won't have time to fix the mpz module before
the planned final release of 2.2 next week, although I'll
see if we have someone on call who understands the issues.
If you want to help by providing a patch, that would work
too!

According to some comments in setup.py, there's an improved
mpz wrapper for Python here: pympz.sf.net.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=493631&group_id=5470