]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/helpers.cpp
reverted Julians changes to the pragmas
[wxWidgets.git] / wxPython / src / helpers.cpp
index 7bf489e671ba7555333c9b01df97ddce88500a47..74157b52712eeca545559dfc49889b649dbbe008 100644 (file)
@@ -117,7 +117,7 @@ void __wxPreStart()
 
 #ifdef WXP_WITH_THREAD
     PyEval_InitThreads();
-    wxPyEventThreadState = PyThreadState_New(PyThreadState_Get()->interp);
+    wxPyEventThreadState = PyThreadState_Get(); // PyThreadState_New(PyThreadState_Get()->interp);
 #endif
 
     // Bail out if there is already windows created.  This means that the
@@ -305,7 +305,7 @@ PyObject*  wxPyMake_wxObject(wxObject* source) {
             wxString msg("wxPython class not found for ");
             msg += source->GetClassInfo()->GetClassName();
             PyErr_SetString(PyExc_NameError, msg.c_str());
-            return NULL;
+            target = NULL;
         }
     } else {  // source was NULL so return None.
         Py_INCREF(Py_None); target = Py_None;
@@ -457,7 +457,7 @@ void wxPyCallback::EventThunker(wxEvent& event) {
     Py_DECREF(tuple);
     if (result) {
         Py_DECREF(result);
-        PyErr_Clear();
+        PyErr_Clear();       // Just in case...
     } else {
         PyErr_Print();
     }