]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_font.i
Undo part of lst change
[wxWidgets.git] / wxPython / src / _font.i
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;
         }
     }
 };