[Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python (original) (raw)
Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Fri, 4 Aug 2000 10:30:25 +0200
- Previous message: [Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python
- Next message: [Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
thomas wrote:
> + if (!PyIsInitialized()) > + PyFatalError("Interpreter not initialized (version =20 Wasn't there a problem with this, because the 'PyFatalError()' would = be the one in the uninitialized library and thus result in the same tstate = error ?
you mean this one:
Py_FatalError("PyThreadState_Get: no current thread");
Perhaps it needs a separate error message, that avoids the usual = Python cleanup and trickery and just prints the error message and exits ?
void Py_FatalError(char msg) { fprintf(stderr, "Fatal Python error: %s\n", msg); #ifdef macintosh for (;;); #endif #ifdef MS_WIN32 OutputDebugString("Fatal Python error: "); OutputDebugString(msg); OutputDebugString("\n"); #ifdef _DEBUG DebugBreak(); #endif #endif / MS_WIN32 */ abort(); }
- Previous message: [Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python
- Next message: [Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]