diff options
author | Guido van Rossum <guido@python.org> | 1997-08-17 16:25:45 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-08-17 16:25:45 (GMT) |
commit | 787bdd37a0817d038aff9ea45d06ceb14dccece4 (patch) | |
tree | e82c8a0798d79940103415d0b59bfbe4b2319e4b /Objects | |
parent | 607b33a1fe760859d5079cbe743fdc2364d3c6e7 (diff) | |
download | cpython-787bdd37a0817d038aff9ea45d06ceb14dccece4.zip cpython-787bdd37a0817d038aff9ea45d06ceb14dccece4.tar.gz cpython-787bdd37a0817d038aff9ea45d06ceb14dccece4.tar.bz2 |
PyTuple_SetItem should require that the tuple's refcnt is one!
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/tupleobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 0faedb4..d6fb6b4 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -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; |