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:
@@ -1226,6 +1226,11 @@ public:
|
|||||||
PyObject* ro;
|
PyObject* ro;
|
||||||
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col));
|
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col));
|
||||||
if (ro) {
|
if (ro) {
|
||||||
|
if (!PyString_Check(ro) && !PyUnicode_Check(ro)) {
|
||||||
|
PyObject* old = ro;
|
||||||
|
ro = PyObject_Str(ro);
|
||||||
|
Py_DECREF(old);
|
||||||
|
}
|
||||||
rval = Py2wxString(ro);
|
rval = Py2wxString(ro);
|
||||||
Py_DECREF(ro);
|
Py_DECREF(ro);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user