Fixed a typemap.
Added a Python list --> wxArrayInt typemap and wxArrayInt --> Python list helper. Added wxMultiChoiceDialog. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user