Acquire the GIL in GetSelections
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -104,10 +104,9 @@ public:
|
|||||||
// works for single as well as multiple selection listboxes (unlike
|
// works for single as well as multiple selection listboxes (unlike
|
||||||
// GetSelection which only works for listboxes with single selection)
|
// GetSelection which only works for listboxes with single selection)
|
||||||
//virtual int GetSelections(wxArrayInt& aSelections) const;
|
//virtual int GetSelections(wxArrayInt& aSelections) const;
|
||||||
%extend
|
%extend {
|
||||||
{
|
PyObject* GetSelections() {
|
||||||
PyObject* GetSelections()
|
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||||
{
|
|
||||||
wxArrayInt lst;
|
wxArrayInt lst;
|
||||||
self->GetSelections(lst);
|
self->GetSelections(lst);
|
||||||
PyObject *tup = PyTuple_New(lst.GetCount());
|
PyObject *tup = PyTuple_New(lst.GetCount());
|
||||||
@@ -115,6 +114,7 @@ public:
|
|||||||
{
|
{
|
||||||
PyTuple_SetItem(tup, i, PyInt_FromLong(lst[i]));
|
PyTuple_SetItem(tup, i, PyInt_FromLong(lst[i]));
|
||||||
}
|
}
|
||||||
|
wxPyEndBlockThreads(blocked);
|
||||||
return tup;
|
return tup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user