From ffb4a474d3b1b1adce9d461b3ef0babd11b1028d Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 11 Apr 2006 01:18:23 +0000 Subject: [PATCH] Acquire the GIL in GetSelections git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_listbox.i | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wxPython/src/_listbox.i b/wxPython/src/_listbox.i index e4f638f3c0..5f9005b7e9 100644 --- a/wxPython/src/_listbox.i +++ b/wxPython/src/_listbox.i @@ -104,10 +104,9 @@ public: // works for single as well as multiple selection listboxes (unlike // GetSelection which only works for listboxes with single selection) //virtual int GetSelections(wxArrayInt& aSelections) const; - %extend - { - PyObject* GetSelections() - { + %extend { + PyObject* GetSelections() { + wxPyBlock_t blocked = wxPyBeginBlockThreads(); wxArrayInt lst; self->GetSelections(lst); PyObject *tup = PyTuple_New(lst.GetCount()); @@ -115,6 +114,7 @@ public: { PyTuple_SetItem(tup, i, PyInt_FromLong(lst[i])); } + wxPyEndBlockThreads(blocked); return tup; } } -- 2.45.2