]> git.saurik.com Git - wxWidgets.git/commitdiff
Some cleanup and a fix
authorRobin Dunn <robin@alldunn.com>
Fri, 22 Dec 2000 00:47:36 +0000 (00:47 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 22 Dec 2000 00:47:36 +0000 (00:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/helpers.cpp
wxPython/src/helpers.h

index d979802917d158d0d2e5f1080d302b1ef4535e8b..33838befc999c43a5bc43399380b7aecdc7b8ccd 100644 (file)
@@ -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();
index f53092e220ef5c496b3015fc33bd0ebc1d6865cb..b542b5f2b419e70faf8b8f854ab6a0673fc24723 100644 (file)
@@ -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
     }