Commit 16596ddb authored by Neal Norwitz's avatar Neal Norwitz

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
parent ff0940ff
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment