X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/92515dfc1c90af8541d91fc551bfe9ce5782a567..96221a45d31984596dc34d4966c294334e88e68c:/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp diff --git a/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp b/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp index a207f961ab..537f431168 100644 --- a/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp +++ b/wxPython/contrib/glcanvas/msw/glcanvas_wrap.cpp @@ -985,6 +985,10 @@ typedef struct swig_const_info { /* Common SWIG API */ +#if PY_VERSION_HEX < 0x02050000 +typedef int Py_ssize_t; +#endif + /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) @@ -2048,7 +2052,7 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { void *vptr = 0; /* here we get the method pointer for callbacks */ - char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) { desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;