Index: Modules/_localemodule.c =================================================================== --- Modules/_localemodule.c (revision 75278) +++ Modules/_localemodule.c (working copy) @@ -9,6 +9,7 @@ ******************************************************************/ +#define PY_SSIZE_T_CLEAN #include "Python.h" #include @@ -315,7 +316,7 @@ result = PyUnicode_FromWideChar(buf, n2); exit: if (buf) PyMem_Free(buf); -#ifdef HAVE_USABLE_WCHAR_T +#ifndef HAVE_USABLE_WCHAR_T PyMem_Free(s); #endif return result;