Significantly changed how the Python interpreter lock and thread state
are managed, which should fix the problem of running on a multi-processor machine. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -105,13 +105,13 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
dest = reg1.GetBox();
|
||||
|
||||
if (dest != wxRect(0,0,0,0)) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
wxPyTState* state = wxPyBeginBlockThreads();
|
||||
wxRect* newRect = new wxRect(dest);
|
||||
obj = wxPyConstructObject((void*)newRect, "wxRect");
|
||||
PyObject* one = PyInt_FromLong(1);
|
||||
PyObject_SetAttrString(obj, "thisown", one);
|
||||
Py_DECREF(one);
|
||||
wxPySaveThread(doSave);
|
||||
wxPyEndBlockThreads(state);
|
||||
return obj;
|
||||
}
|
||||
Py_INCREF(Py_None);
|
||||
|
Reference in New Issue
Block a user