From cc35159ed87c27966de1a06b71e05e184303b7fc Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 12 Jul 2013 00:02:55 +0200 Subject: Issue #18408: normalizestring() now raises MemoryError on memory allocation failure --- Python/codecs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/codecs.c') diff --git a/Python/codecs.c b/Python/codecs.c index 8d9ce6f496..899f0aa748 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -65,7 +65,7 @@ PyObject *normalizestring(const char *string) p = PyMem_Malloc(len + 1); if (p == NULL) - return NULL; + return PyErr_NoMemory(); for (i = 0; i < len; i++) { register char ch = string[i]; if (ch == ' ') -- cgit v1.2.1