mirror of https://github.com/python/cpython
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
This commit is contained in:
parent
ff0940ff53
commit
16596ddb61
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue