Update of /cvsroot/pywin32/pywin32/Pythonwin
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7401/Pythonwin
Modified Files:
Tag: py3k
dllmain.cpp win32uimodule.cpp
Log Message:
merge win32ui shutdown fixes and traceback printing from py3k-integration branch
Index: win32uimodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uimodule.cpp,v
retrieving revision 1.39.2.11
retrieving revision 1.39.2.12
diff -C2 -d -r1.39.2.11 -r1.39.2.12
*** win32uimodule.cpp 3 Jan 2009 04:45:17 -0000 1.39.2.11
--- win32uimodule.cpp 7 Jan 2009 06:27:42 -0000 1.39.2.12
***************
*** 666,670 ****
// not good (and not what we want!?
PyErr_NormalizeException(&type, &value, &traceback);
!
if (type && PyErr_GivenExceptionMatches(type, PyExc_SystemExit)) {
// Replace it with a RuntimeError.
--- 666,677 ----
// not good (and not what we want!?
PyErr_NormalizeException(&type, &value, &traceback);
! #ifdef DEBUG
! // dump it to the debugger in debug builds.
! char *msg = GetPythonTraceback(type, value, traceback);
! if (msg) {
! OutputDebugString(msg);
! free(msg);
! }
! #endif
if (type && PyErr_GivenExceptionMatches(type, PyExc_SystemExit)) {
// Replace it with a RuntimeError.
***************
*** 2389,2392 ****
--- 2396,2401 ----
// These are primarily here as a debugging aid. Destroy what I created
// to help MFC detect useful memory leak reports
+ if (bInFatalShutdown)
+ return;
ui_assoc_object::handleMgr.cleanup();
Index: dllmain.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/dllmain.cpp,v
retrieving revision 1.5.4.1
retrieving revision 1.5.4.2
diff -C2 -d -r1.5.4.1 -r1.5.4.2
*** dllmain.cpp 29 Aug 2008 05:53:29 -0000 1.5.4.1
--- dllmain.cpp 7 Jan 2009 06:27:42 -0000 1.5.4.2
***************
*** 212,216 ****
// could not have been created. Let the Python code manage if it wants!
Win32uiFinalize();
- Python_delete_assoc(pCreatedApp); // so Python wont try and use it.
AfxWinTerm();
afxCurrentWinApp = NULL; // So AfxGetApp fails from here.
--- 212,215 ----
|