X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4958ea8f7b27a4213e092234a13d151b7b08fbea..b9c98327f7780a473daa43d45c5dc7b185b72fce:/wxPython/src/helpers.cpp diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 0943cabc00..6a196331a3 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -1490,6 +1490,18 @@ PyObject* wxArrayString2PyList_helper(const wxArrayString& arr) { } +PyObject* wxArrayInt2PyList_helper(const wxArrayInt& arr) { + + PyObject* list = PyList_New(0); + for (size_t i=0; i < arr.GetCount(); i++) { + PyObject* number = PyInt_FromLong(arr[i]); + PyList_Append(list, number); + Py_DECREF(number); + } + return list; +} + + //---------------------------------------------------------------------- //----------------------------------------------------------------------