Author: Matti Picus <matti.pi...@gmail.com> Branch: Changeset: r91438:1049e523ffdb Date: 2017-05-30 01:48 +0300 http://bitbucket.org/pypy/pypy/changeset/1049e523ffdb/
Log: check tuple, not contents diff --git a/pypy/module/cpyext/tupleobject.py b/pypy/module/cpyext/tupleobject.py --- a/pypy/module/cpyext/tupleobject.py +++ b/pypy/module/cpyext/tupleobject.py @@ -141,7 +141,7 @@ decref(space, py_obj) raise oefmt(space.w_IndexError, "tuple assignment index out of range") old_ref = ref.c_ob_item[index] - if old_ref and pyobj_has_w_obj(old_ref): + if pyobj_has_w_obj(ref): # similar but not quite equal to ref.c_ob_refcnt != 1 on CPython raise oefmt(space.w_SystemError, "PyTuple_SetItem called on tuple after" " use of tuple") _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit