[Python-checkins] r55373 - python/branches/release25-maint/Objects/intobject.c

neal.norwitz python-checkins at python.org
Wed May 16 06:35:13 CEST 2007


Author: neal.norwitz
Date: Wed May 16 06:35:11 2007
New Revision: 55373

Modified:
   python/branches/release25-maint/Objects/intobject.c
Log:
Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC()
fails.


Modified: python/branches/release25-maint/Objects/intobject.c
==============================================================================
--- python/branches/release25-maint/Objects/intobject.c	(original)
+++ python/branches/release25-maint/Objects/intobject.c	Wed May 16 06:35:11 2007
@@ -394,7 +394,7 @@
 	char *buffer = (char *)PyMem_MALLOC(length+1);
 
 	if (buffer == NULL)
-		return NULL;
+		return PyErr_NoMemory();
 
 	if (PyUnicode_EncodeDecimal(s, length, buffer, NULL)) {
 		PyMem_FREE(buffer);


More information about the Python-checkins mailing list