[Python-Dev] [Python 2.4] PyInt_FromLong returning NULL (original) (raw)
Tim Peters tim.peters at gmail.com
Tue Dec 7 19:40:01 CET 2004
- Previous message: [Python-Dev] [Python 2.4] PyInt_FromLong returning NULL
- Next message: [Python-Dev] [Python 2.4] PyInt_FromLong returning NULL
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[A.M. Kuchling]
Is it possible that some other Python API call is raising an exception, but a NULL return isn't being checked for, and PyIntFromLong() happens to be the first bit of code that does 'if (PyErrOccurred())'? Though from a quick glance at PyIntFromLong() and the macros it uses, I don't see any references to PyErrOccurred()...
A long stare wouldn't uncover any either . This isn't it. That 1 is passed as an argument is important too, which cuts out all but the simplest path thru this code.
The (current Zope 2.7 branch) source for cAccessControl.c contains six calls to PyInt_FromLong(). Five of them pass the literal 1. The other passes a variable with value -1, 0, or 1. So regardless of which of these Andreas is talking about, it's going thru PyInt_FromLong's fast path.
- Previous message: [Python-Dev] [Python 2.4] PyInt_FromLong returning NULL
- Next message: [Python-Dev] [Python 2.4] PyInt_FromLong returning NULL
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]