Various updates, changes for wxTopLevelWindow, fixes for
wxPen.SetDashes, etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1011,11 +1011,24 @@ wxString* wxString_LIST_helper(PyObject* source) {
|
||||
}
|
||||
for (int x=0; x<count; x++) {
|
||||
PyObject* o = PyList_GetItem(source, x);
|
||||
#if PYTHON_API_VERSION >= 1009
|
||||
if (! PyString_Check(o) && ! PyUnicode_Check(o)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list of string or unicode objects.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char* buff;
|
||||
int length;
|
||||
if (PyString_AsStringAndSize(o, &buff, &length) == -1)
|
||||
return NULL;
|
||||
temp[x] = wxString(buff, length);
|
||||
#else
|
||||
if (! PyString_Check(o)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Expected a list of strings.");
|
||||
return NULL;
|
||||
}
|
||||
temp[x] = PyString_AsString(o);
|
||||
#endif
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
Reference in New Issue
Block a user