X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/856bf319b572699cc31ceef8cf78d1b9770cacf9..68ff6404bb8ea57371214a6c8a416cf8a4a31453:/wxPython/src/calendar.i diff --git a/wxPython/src/calendar.i b/wxPython/src/calendar.i index b98a1e330a..3a91233610 100644 --- a/wxPython/src/calendar.i +++ b/wxPython/src/calendar.i @@ -352,12 +352,12 @@ validity of the remaining two values. The result codes are: wxDateTime* date = new wxDateTime; wxDateTime::WeekDay wd; wxCalendarHitTestResult result = self->HitTest(pos, date, &wd); - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(3); PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(result)); PyTuple_SET_ITEM(tup, 1, wxPyConstructObject(date, wxT("wxDateTime"), 1)); PyTuple_SET_ITEM(tup, 2, PyInt_FromLong(wd)); - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return tup; } }