mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
PyTuple_SetItem should require that the tuple's refcnt is one!
This commit is contained in:
parent
607b33a1fe
commit
787bdd37a0
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue