PyFloat_AsDouble broken with RedHat 6.x???
Norbert Pirzkal
npirzkal at eso.org
Sun Sep 26 07:24:28 EDT 1999
Hi All,
I am having a strange problem with some of my (swigged) C extension to
Python.
I have a function which does the following (somewhat simplified...):
static PyObject test(PyObject *self, PyObject *args) {
...
PyObject * _resultobj;
char * _argc0 ;
PyObject * _obj2 ;
PyObject * _obj3 ;
PyObject * _obj4 ;
double *dtmp;
...
PyArg_ParseTuple(args,"sOOO:fits_write_key",&_argc0,&_obj2,
&_obj3,&_obj4);
if(PyFloat_Check(_obj3)) {
dtmp = (double *)calloc(1,sizeof(double));
dtmp=PyFloat_AsDouble((PyObject *)_obj3);
}
etc..
This code works perfectly under Linux RedHat 5.2, Solaris, and even
OpenStep 4.2, BUT it stopped working with the new release of RedHat 6.0.
It looks like the function(s) PyFloat_As..() are broken somehow.
When I pass for example, 1.0 as the third argument to my function under
Python, the value returned by PyFloat_AsDouble is 2.93991353473135E-102
.
Has anyone experience this problem? Does anyone have a fix?
Cheers,
Nor
More information about the Python-list
mailing list