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:
Robin Dunn
2001-09-27 02:11:47 +00:00
parent 34a1d7328f
commit ecc08ead91
23 changed files with 1999 additions and 1584 deletions

View File

@@ -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;
}