PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
type, otype);
}
- Py_DECREF(str);
+ if (str)
+ Py_DECREF(str);
return;
}
}
int i, len=PySequence_Length(obj2);
for (i=0; i<len; i++) {
PyObject* item = PySequence_GetItem(obj2, i);
-#if wxUSE_UNICODE
- PyObject* str = PyObject_Unicode(item);
-#else
- PyObject* str = PyObject_Str(item);
-#endif
+ wxString* s = wxString_in_helper(item);
if (PyErr_Occurred()) SWIG_fail;
- arg3->Add(Py2wxString(str));
+ arg3->Add(*s);
+ delete s;
Py_DECREF(item);
- Py_DECREF(str);
}
}
{