Commit 0dcea597 authored by Thomas Wouters's avatar Thomas Wouters

_PyTuple_Resize: guard against PyTuple_New() returning NULL, using Tim's

suggestion (modulo style).
parent 3a2ab1ab
......@@ -516,7 +516,7 @@ _PyTuple_Resize(PyObject **pv, int newsize)
(current) reference */
Py_DECREF(v);
*pv = PyTuple_New(newsize);
return 0;
return *pv == NULL ? -1 : 0;
}
/* XXX UNREF/NEWREF interface should be more symmetrical */
......
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