} else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
- } else {
- o2 = target;
- target = PyTuple_New(1);
- PyTuple_SetItem(target, 0, o2);
-
+ } else {
+ if (!PyTuple_Check(target)) {
+ o2 = target;
+ target = PyTuple_New(1);
+ PyTuple_SetItem(target, 0, o2);
+ }
o3 = PyTuple_New(1);
PyTuple_SetItem(o3, 0, o);
Py_DECREF(o3);
}
return target;
-}
+ }
PyObject *wxPyTreeListCtrl_GetBoundingRect(wxPyTreeListCtrl *self,wxTreeItemId const &item,bool textOnly){