[issue3777] PyNumber_Long fails from Float

2008-09-06 Thread Barry Alan Scott
Barry Alan Scott <[EMAIL PROTECTED]> added the comment: O.k. I know what is going on. Here is the description from abstracts.h for PyNumber_Long: PyAPI_FUNC(PyObject *) PyNumber_Long(PyObject *o); /* Returns the o converted to a long integer object on success, or

[issue3777] PyNumber_Long fails from Float

2008-09-06 Thread Barry Alan Scott
Barry Alan Scott <[EMAIL PROTECTED]> added the comment: You are right that its the Py::Long( Py::Float( double( x ) ) ) that is triggering this problem. Here is the gdb from the powerpc build that shows the info you asked for and show res being corrupt. I'm going to try and build a smaller vers

[issue3777] PyNumber_Long fails from Float

2008-09-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Note to others: PySvn uses the PyCXX classes. The call in question is something similar to Py::Long( Py::Float( double( someValue ) ) ) Barry, what is the exact error message that you get? What do you mean by "res does not contain th

[issue3777] PyNumber_Long fails from Float

2008-09-04 Thread Barry Alan Scott
New submission from Barry Alan Scott <[EMAIL PROTECTED]>: I am testing PySVN against python2.6b3. I see a failure when PyNumber_Long is called with a Float. It raises TypeError. The same code works on 2.3, 2.4 and 2.5. Looking with GDB I see: (gdb) bt #0 PyNumber_Long (o=0x1809384) at Object