Fixed typemaps for wxArrayInt
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1804,8 +1804,8 @@ public:
|
||||
const wxGridCellCoordsArray& GetSelectedCells() const;
|
||||
const wxGridCellCoordsArray& GetSelectionBlockTopLeft() const;
|
||||
const wxGridCellCoordsArray& GetSelectionBlockBottomRight() const;
|
||||
const wxArrayInt& GetSelectedRows() const;
|
||||
const wxArrayInt& GetSelectedCols() const;
|
||||
const wxArrayInt GetSelectedRows() const;
|
||||
const wxArrayInt GetSelectedCols() const;
|
||||
|
||||
|
||||
// This function returns the rectangle that encloses the block of cells
|
||||
|
@@ -313,7 +313,7 @@ $function
|
||||
}
|
||||
|
||||
|
||||
// Typemap to convert an array of ints to a list
|
||||
// Typemaps to convert an array of ints to a list
|
||||
%typemap(python, out) wxArrayInt& {
|
||||
$target = PyList_New(0);
|
||||
size_t idx;
|
||||
@@ -324,6 +324,17 @@ $function
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(python, out) wxArrayInt {
|
||||
$target = PyList_New(0);
|
||||
size_t idx;
|
||||
for (idx = 0; idx < $source->GetCount(); idx += 1) {
|
||||
PyObject* val = PyInt_FromLong($source->Item(idx));
|
||||
PyList_Append($target, val);
|
||||
Py_DECREF(val);
|
||||
}
|
||||
delete $source;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Map T_OUTPUTs for floats to return ints.
|
||||
|
Reference in New Issue
Block a user