comparison Python/pythonrun.c @ 62194:f83f201b1276 3.1

Merged revisions 81844 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81844 | victor.stinner | 2010-06-08 23:00:13 +0200 (mar., 08 juin 2010) | 6 lines Py_FatalError(): don't sys sys.last_xxx variables Call PyErr_PrintEx(0) instead of PyErr_Print() to avoid a crash if Py_FatalError() is called in an early stage of Python initialization (if PySys is not yet initialized). ........
author Victor Stinner <victor.stinner@haypocalc.com>
date Tue, 08 Jun 2010 21:05:20 +0000
parents 3271af035d01
children fa830371c724
comparison
equal deleted inserted replaced
62193:d47fe4134e7d 62194:f83f201b1276
2022 Py_FatalError(const char *msg) 2022 Py_FatalError(const char *msg)
2023 { 2023 {
2024 fprintf(stderr, "Fatal Python error: %s\n", msg); 2024 fprintf(stderr, "Fatal Python error: %s\n", msg);
2025 fflush(stderr); /* it helps in Windows debug build */ 2025 fflush(stderr); /* it helps in Windows debug build */
2026 if (PyErr_Occurred()) { 2026 if (PyErr_Occurred()) {
2027 PyErr_Print(); 2027 PyErr_PrintEx(0);
2028 } 2028 }
2029 #ifdef MS_WINDOWS 2029 #ifdef MS_WINDOWS
2030 { 2030 {
2031 size_t len = strlen(msg); 2031 size_t len = strlen(msg);
2032 WCHAR* buffer; 2032 WCHAR* buffer;