diff Objects/bytesobject.c @ 43031:ac2d5d346252

Try to fix the problem on the Windows buildbot where this code: b * sys.maxint # from test_bytes.py line 379 Caused: SystemError: error return without exception set
author Neal Norwitz <nnorwitz@gmail.com>
date Thu, 30 Aug 2007 05:44:54 +0000
parents eafc8b23589d
children 1bb63a32a6c8
line wrap: on
line diff
--- a/Objects/bytesobject.c	Thu Aug 30 05:40:17 2007 +0000
+++ b/Objects/bytesobject.c	Thu Aug 30 05:44:54 2007 +0000
@@ -125,7 +125,7 @@
         new->ob_bytes = PyMem_Malloc(alloc);
         if (new->ob_bytes == NULL) {
             Py_DECREF(new);
-            return NULL;
+            return PyErr_NoMemory();
         }
         if (bytes != NULL)
             memcpy(new->ob_bytes, bytes, size);