mirror of https://github.com/python/cpython
PyTuple_SetItem should require that the tuple's refcnt is one!
This commit is contained in:
parent
607b33a1fe
commit
787bdd37a0
|
@ -133,7 +133,7 @@ PyTuple_SetItem(op, i, newitem)
|
|||
{
|
||||
register PyObject *olditem;
|
||||
register PyObject **p;
|
||||
if (!PyTuple_Check(op)) {
|
||||
if (!PyTuple_Check(op) || op->ob_refcnt != 1) {
|
||||
Py_XDECREF(newitem);
|
||||
PyErr_BadInternalCall();
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue