int -> Py_ssize_t to fix 64 bit Python 3 failure to compile generated code

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11195 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2009-04-29 13:43:23 +00:00
commit 1c91a4a9b9

View file

@ -31,7 +31,7 @@ SWIG_Python_str_AsChar(PyObject *str)
#if PY_VERSION_HEX >= 0x03000000
char *cstr;
char *newstr;
int len;
Py_ssize_t len;
str = PyUnicode_AsUTF8String(str);
PyBytes_AsStringAndSize(str, &cstr, &len);
newstr = (char *) malloc(len+1);