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

suggestion (modulo style).
This commit is contained in:
Thomas Wouters 2001-05-29 07:58:45 +00:00
parent 3a2ab1ab69
commit 0dcea5973d
1 changed files with 1 additions and 1 deletions

View File

@ -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 */