From 16596ddb61558818949958f5dcf14d23f406a5bc Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Thu, 30 Aug 2007 05:44:54 +0000 Subject: [PATCH] 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 --- Objects/bytesobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index c13269262f4..ec379281ccc 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -125,7 +125,7 @@ PyBytes_FromStringAndSize(const char *bytes, Py_ssize_t size) 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);