X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2aab8f16ac7200349b41af957396029c176a9b9d..aaf765a54931a3add43bcf68cec8c80f0b66b18a:/wxPython/src/helpers.cpp?ds=inline 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; +} + + //---------------------------------------------------------------------- //----------------------------------------------------------------------