PyInt_AsLong()

Michael Hudson mwh at python.net
Wed Apr 3 06:21:47 EST 2002


Ralf Juengling <juenglin at informatik.uni-freiburg.de> writes:

> Hi,
> 
> PyInt_AsLong() returns '-1´ to indicate an error, this meets the convetion 
> for PyXXX()-functions which return integers. But how do you distinguish an
> '-1' indicating an error from a the legal long-value '-1'?

if ((retval == -1) && PyErr_Occurred()) {
    waagh!
}

Cheers,
M.



More information about the Python-list mailing list