[Python-bugs-list] C API/PyFloat_AsDouble() w/ RH6.x (PR#87)
Guido van Rossum
Sun, 26 Sep 1999 10:06:32 -0400
> The values returned by PyFloat_AsDouble() are no longer correct when
> I compile my Python C extended function under RH 6.0.
> I have had the same C code compiled and running flawlessly under
> RH5.2 , Solaris 2.6, and OpenStep 4.2.
> I could not find any information as to what could cause these
> functions to stop working with the new RH distributions
> (PyInt_AsLong() also fails, PyString_AsString() still works).
I'm certain that the problem is not Python itself but a configuration
problem. Without access to your system, this is almost impossible to
My guess is that you are using a different compiler or linker or
(perhaps most likely) a different glibc version than the installed
Python on your platform. It's also possible that the installed Python
is not the same Python version, which could explain all this.
If you don't get any further with investigating these possibilities,
can you mail us a *small* but *complete* example of code that fails
under RH 6.0 but succeeds on other platforms? (If you mail us the
1000-line extension you wrote, it'll likely be impossible for us to
determine what's wrong. If you reproduce the same problem in a
100-line extension that defines one function which makes one call to
PyFloat_AsDouble(), we might have a chance.)
--Guido van Rossum (home page: http://www.python.org/~guido/)