X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a446686f062b8abbedf34c01ef56c75396a8ab1..794c5cb151d633aa13a4f74292713544c6ccf381:/wxPython/src/msw/streams.cpp diff --git a/wxPython/src/msw/streams.cpp b/wxPython/src/msw/streams.cpp index bc7024b5b5..cbe4f57642 100644 --- a/wxPython/src/msw/streams.cpp +++ b/wxPython/src/msw/streams.cpp @@ -105,7 +105,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif // C++ // definitions of wxStringPtrList and wxPyInputStream #include @@ -708,7 +712,7 @@ static PyObject *_wrap_wxOutputStream_write(PyObject *self, PyObject *args, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)