]> git.saurik.com Git - wxWidgets.git/commitdiff
Add some missing wxPyBeginBlockThreads calls
authorRobin Dunn <robin@alldunn.com>
Sat, 15 Apr 2006 04:29:30 +0000 (04:29 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 15 Apr 2006 04:29:30 +0000 (04:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/_config.i
wxPython/src/_font.i

index 434b42cdb11896eff52e9480b78cf9c42128929e..1c8b100ff3c3357d6cca9bd8f22e92ef7d640721 100644 (file)
 
 %{
     static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) {
+        wxPyBlock_t blocked = wxPyBeginBlockThreads();
         PyObject* ret = PyTuple_New(3);
         if (ret) {
             PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag));
            PyTuple_SET_ITEM(ret, 1, wx2PyString(str));
             PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index));
         }
+        wxPyEndBlockThreads(blocked);
         return ret;
     }
 %}
index 0e1922ad52c8bec8f215849c71a39f0eed14ad2c..0e3fc5ba79da4402fb75a93c293a0d26f3a546d0 100644 (file)
@@ -842,19 +842,27 @@ public:
     //wxArrayString* GetFacenames();
     %extend {
         PyObject* GetEncodings() {
+            PyObject* ret;
             wxArrayString* arr = self->GetEncodings();
+            wxPyBlock_t blocked = wxPyBeginBlockThreads();            
             if (arr)
-                return wxArrayString2PyList_helper(*arr);
+                ret = wxArrayString2PyList_helper(*arr);
             else
-                return PyList_New(0);
+                ret = PyList_New(0);
+            wxPyEndBlockThreads(blocked);
+            return ret;
         }
 
         PyObject* GetFacenames() {
+            PyObject* ret;
             wxArrayString* arr = self->GetFacenames();
+            wxPyBlock_t blocked = wxPyBeginBlockThreads();            
             if (arr)
-                return wxArrayString2PyList_helper(*arr);
+                ret = wxArrayString2PyList_helper(*arr);
             else
-                return PyList_New(0);
+                ret =  PyList_New(0);
+            wxPyEndBlockThreads(blocked);
+            return ret;
         }
     }
 };