Add some missing wxPyBeginBlockThreads calls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
619297ab30
commit
e6f85a8554
@ -24,12 +24,14 @@
|
|||||||
|
|
||||||
%{
|
%{
|
||||||
static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) {
|
static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) {
|
||||||
|
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||||
PyObject* ret = PyTuple_New(3);
|
PyObject* ret = PyTuple_New(3);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag));
|
PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag));
|
||||||
PyTuple_SET_ITEM(ret, 1, wx2PyString(str));
|
PyTuple_SET_ITEM(ret, 1, wx2PyString(str));
|
||||||
PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index));
|
PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index));
|
||||||
}
|
}
|
||||||
|
wxPyEndBlockThreads(blocked);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
@ -842,19 +842,27 @@ public:
|
|||||||
//wxArrayString* GetFacenames();
|
//wxArrayString* GetFacenames();
|
||||||
%extend {
|
%extend {
|
||||||
PyObject* GetEncodings() {
|
PyObject* GetEncodings() {
|
||||||
|
PyObject* ret;
|
||||||
wxArrayString* arr = self->GetEncodings();
|
wxArrayString* arr = self->GetEncodings();
|
||||||
|
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||||
if (arr)
|
if (arr)
|
||||||
return wxArrayString2PyList_helper(*arr);
|
ret = wxArrayString2PyList_helper(*arr);
|
||||||
else
|
else
|
||||||
return PyList_New(0);
|
ret = PyList_New(0);
|
||||||
|
wxPyEndBlockThreads(blocked);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject* GetFacenames() {
|
PyObject* GetFacenames() {
|
||||||
|
PyObject* ret;
|
||||||
wxArrayString* arr = self->GetFacenames();
|
wxArrayString* arr = self->GetFacenames();
|
||||||
|
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||||
if (arr)
|
if (arr)
|
||||||
return wxArrayString2PyList_helper(*arr);
|
ret = wxArrayString2PyList_helper(*arr);
|
||||||
else
|
else
|
||||||
return PyList_New(0);
|
ret = PyList_New(0);
|
||||||
|
wxPyEndBlockThreads(blocked);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user