From: Robin Dunn Date: Fri, 22 Dec 2000 00:47:36 +0000 (+0000) Subject: Some cleanup and a fix X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bdb9373a32c8fa962b913a6a90fb6a24424137d2 Some cleanup and a fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index d979802917..33838befc9 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -309,7 +309,7 @@ static PyThreadState* myPyThreadState_Get() { } -HELPEREXPORT bool wxPyRestoreThread() { +bool wxPyRestoreThread() { // NOTE: The Python API docs state that if a thread already has the // interpreter lock and calls PyEval_RestoreThread again a deadlock // occurs, so I put in this code as a guard condition since there are @@ -328,7 +328,7 @@ HELPEREXPORT bool wxPyRestoreThread() { } -HELPEREXPORT void wxPySaveThread(bool doSave) { +void wxPySaveThread(bool doSave) { #ifdef WXP_WITH_THREAD if (doSave) { wxPyEventThreadState = PyEval_SaveThread(); diff --git a/wxPython/src/helpers.h b/wxPython/src/helpers.h index f53092e220..b542b5f2b4 100644 --- a/wxPython/src/helpers.h +++ b/wxPython/src/helpers.h @@ -323,15 +323,11 @@ public: bool doSave; #ifdef wxPyUSE_EXPORT doSave = wxPyCoreAPIPtr->p_wxPyRestoreThread(); -#else - doSave = wxPyRestoreThread(); -#endif - Py_DECREF(m_obj); - -#ifdef wxPyUSE_EXPORT wxPyCoreAPIPtr->p_wxPySaveThread(doSave); #else + doSave = wxPyRestoreThread(); + Py_DECREF(m_obj); wxPySaveThread(doSave); #endif }