summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-10-19 19:43:09 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-10-19 19:43:09 (GMT)
commit6a448d4c2eac16af4c451b43c6dc46cf287b1671 (patch)
tree27935dbb967bd6714bb6a4e1c3cbc862dc902b21 /Modules
parent86906f783162d204b43b976ab81c53b8a57098bd (diff)
downloadcpython-6a448d4c2eac16af4c451b43c6dc46cf287b1671.zip
cpython-6a448d4c2eac16af4c451b43c6dc46cf287b1671.tar.gz
cpython-6a448d4c2eac16af4c451b43c6dc46cf287b1671.tar.bz2
Issue #7080: locale.strxfrm() raises a MemoryError on 64-bit non-Windows
platforms, and assorted locale fixes by Derk Drukker.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_localemodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
index 8bcdb10..d90a49d 100644
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -9,6 +9,7 @@ This software comes with no warranty. Use at your own risk.
******************************************************************/
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include <stdio.h>
@@ -315,7 +316,7 @@ PyLocale_strxfrm(PyObject* self, PyObject* args)
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;