]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/calendar.i
Changed (again) how the GIL is aquired and the tstate restored. This
[wxWidgets.git] / wxPython / src / calendar.i
index b98a1e330a1a295cd133469b5747a9e920a892fc..3a91233610fa75aa6258a22471da7f9458f091ec 100644 (file)
@@ -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;
         }
     }