diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-30 05:44:54 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-30 05:44:54 (GMT) |
commit | 16596ddb61558818949958f5dcf14d23f406a5bc (patch) | |
tree | 5ab197d17b5d15b8563d2bda4bfa57d23c16eee1 | |
parent | ff0940ff534903a0690826eae587d7132881836f (diff) | |
download | cpython-16596ddb61558818949958f5dcf14d23f406a5bc.zip cpython-16596ddb61558818949958f5dcf14d23f406a5bc.tar.gz cpython-16596ddb61558818949958f5dcf14d23f406a5bc.tar.bz2 |
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
-rw-r--r-- | Objects/bytesobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index c132692..ec37928 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); |