diff -r c8701b9256cf Include/pyport.h --- a/Include/pyport.h Tue Mar 29 13:00:28 2011 -0700 +++ b/Include/pyport.h Wed Mar 30 09:41:06 2011 +0200 @@ -176,9 +176,13 @@ */ #ifdef HAVE_SSIZE_T typedef ssize_t Py_ssize_t; +#define HAVE_PY_SSIZE_T 1 #elif SIZEOF_VOID_P == SIZEOF_SIZE_T typedef Py_intptr_t Py_ssize_t; -#else +#define HAVE_PY_SSIZE_T 1 +#endif + +#ifndef HAVE_PY_SSIZE_T # error "Python needs a typedef for Py_ssize_t in pyport.h." #endif diff -r c8701b9256cf Objects/typeobject.c --- a/Objects/typeobject.c Tue Mar 29 13:00:28 2011 -0700 +++ b/Objects/typeobject.c Wed Mar 30 09:41:06 2011 +0200 @@ -2353,7 +2353,7 @@ /* need to make a copy of the docstring slot, which usually points to a static string literal */ if (slot->slot == Py_tp_doc) { - ssize_t len = strlen(slot->pfunc)+1; + Py_ssize_t len = strlen(slot->pfunc)+1; char *tp_doc = PyObject_MALLOC(len); if (tp_doc == NULL) goto fail; diff -r c8701b9256cf PC/pyconfig.h --- a/PC/pyconfig.h Tue Mar 29 13:00:28 2011 -0700 +++ b/PC/pyconfig.h Wed Mar 30 09:41:06 2011 +0200 @@ -192,11 +192,11 @@ /* Define like size_t, omitting the "unsigned" */ #ifdef MS_WIN64 -typedef __int64 ssize_t; +typedef __int64 Py_ssize_t; #else -typedef _W64 int ssize_t; +typedef _W64 int Py_ssize_t; #endif -#define HAVE_SSIZE_T 1 +#define HAVE_PY_SSIZE_T 1 #if defined(MS_WIN32) && !defined(MS_WIN64) #ifdef _M_IX86