X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/951cd18031e1408ed2a70dae2972273f8ed9e994..b37c7e1dcdad16c20d9800d2abaf53cc6b653a64:/wxPython/src/helpers.cpp?ds=sidebyside diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 95c921d17b..e485a2f817 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -1297,6 +1297,19 @@ bool wxColour_helper(PyObject* source, wxColour** obj) { //---------------------------------------------------------------------- + +PyObject* wxArrayString2PyList_helper(const wxArrayString& arr) { + + PyObject* list = PyList_New(0); + for (size_t i=0; i < arr.GetCount(); i++) { + PyObject* str = PyString_FromString(arr[i].c_str()); + PyList_Append(list, str); + // TODO: Check refcount on str... + } + return list; +} + + //---------------------------------------------------------------------- //----------------------------------------------------------------------