X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/02b800ce7c2bb1c1f08075f22be2e7412124b47f..c15893b50ef35e3760c3c255e0d84f660b8cd370:/wxPython/src/_font.i?ds=sidebyside diff --git a/wxPython/src/_font.i b/wxPython/src/_font.i index 0e1922ad52..0e3fc5ba79 100644 --- a/wxPython/src/_font.i +++ b/wxPython/src/_font.i @@ -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; } } };