mirror of https://github.com/python/cpython
_PyTuple_Resize: guard against PyTuple_New() returning NULL, using Tim's
suggestion (modulo style).
This commit is contained in:
parent
3a2ab1ab69
commit
0dcea5973d
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue