]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/helpers.cpp
compilation fix
[wxWidgets.git] / wxPython / src / helpers.cpp
index 0943cabc006302e47d3ab25c8cdaf1d71fb32b84..6a196331a39b8e4aa7aee0973f53e43971c24259 100644 (file)
@@ -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;
+}
+
+
 //----------------------------------------------------------------------
 //----------------------------------------------------------------------