]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/helpers.cpp
Added typemap for wxArrayString
[wxWidgets.git] / wxPython / src / helpers.cpp
index 95c921d17b63934c0d0356ead8a0d27745de80f5..e485a2f8176d9c2d779cea6d38dc1cc9adccff83 100644 (file)
@@ -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;
+}
+
+
 //----------------------------------------------------------------------
 //----------------------------------------------------------------------