in unicode mode the return value of gridtable.GetValue must be a

string or a unicode object, as the coerce to unicode function used can
only convert strings.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-06-17 19:23:35 +00:00
parent 8ad74db31e
commit 8826712ea0

View File

@@ -1226,6 +1226,11 @@ public:
PyObject* ro;
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col));
if (ro) {
if (!PyString_Check(ro) && !PyUnicode_Check(ro)) {
PyObject* old = ro;
ro = PyObject_Str(ro);
Py_DECREF(old);
}
rval = Py2wxString(ro);
Py_DECREF(ro);
}