[Python-3000-checkins] r55353 - python/branches/py3k-struni/Objects/intobject.c

guido.van.rossum python-3000-checkins at python.org
Tue May 15 22:39:14 CEST 2007


Author: guido.van.rossum
Date: Tue May 15 22:39:12 2007
New Revision: 55353

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


Modified: python/branches/py3k-struni/Objects/intobject.c
==============================================================================
--- python/branches/py3k-struni/Objects/intobject.c	(original)
+++ python/branches/py3k-struni/Objects/intobject.c	Tue May 15 22:39:12 2007
@@ -393,7 +393,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-3000-checkins mailing list