X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9416aa89ca06d0fb20b1002e026d2c7ac7aa6a17..decb3a6a16ea5acf1dfcdb1b70cb6edaa09840c0:/wxPython/src/helpers.cpp diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 7bf489e671..131ed8b56d 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -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; @@ -411,7 +411,6 @@ void wxPySaveThread(bool doSave) { //--------------------------------------------------------------------------- - IMPLEMENT_ABSTRACT_CLASS(wxPyCallback, wxObject); wxPyCallback::wxPyCallback(PyObject* func) { @@ -457,7 +456,7 @@ void wxPyCallback::EventThunker(wxEvent& event) { Py_DECREF(tuple); if (result) { Py_DECREF(result); - PyErr_Clear(); + PyErr_Clear(); // Just in case... } else { PyErr_Print(); } @@ -1016,10 +1015,7 @@ wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) { PyObject* o1 = PyTuple_GetItem(o, 0); PyObject* o2 = PyTuple_GetItem(o, 1); PyObject* o3 = PyTuple_GetItem(o, 2); - - temp[x].m_flags = PyInt_AsLong(o1); - temp[x].m_keyCode = PyInt_AsLong(o2); - temp[x].m_command = PyInt_AsLong(o3); + temp[x].Set(PyInt_AsLong(o1), PyInt_AsLong(o2), PyInt_AsLong(o3)); } else { PyErr_SetString(PyExc_TypeError, "Expected a list of 3-tuples or wxAcceleratorEntry objects.");