diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-24 20:52:43 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-24 20:52:43 +0200 |
commit | 31850e9e12f3a8300787627714db5876737c8910 (patch) | |
tree | b891362a73b0e9355d6ddc897e4e9002f66af4dd /Objects | |
parent | 306ac9dabf6fd02709c6620b10b9843073f84e96 (diff) | |
parent | 663d9e9a93764f95259cdc43468c5cb13b0b7f9d (diff) | |
download | cpython-31850e9e12f3a8300787627714db5876737c8910.tar.gz |
Issue #29337: Fixed possible BytesWarning when compare the code objects.
Warnings could be emitted at compile time.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/codeobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c index f7f91a8168..0d8a675f9f 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -545,7 +545,7 @@ _PyCode_ConstantKey(PyObject *op) PyTuple_SET_ITEM(tuple, i, item_key); } - key = PyTuple_Pack(3, Py_TYPE(op), op, tuple); + key = PyTuple_Pack(2, tuple, op); Py_DECREF(tuple); } else if (PyFrozenSet_CheckExact(op)) { @@ -579,7 +579,7 @@ _PyCode_ConstantKey(PyObject *op) if (set == NULL) return NULL; - key = PyTuple_Pack(3, Py_TYPE(op), op, set); + key = PyTuple_Pack(2, set, op); Py_DECREF(set); return key; } @@ -590,7 +590,7 @@ _PyCode_ConstantKey(PyObject *op) if (obj_id == NULL) return NULL; - key = PyTuple_Pack(3, Py_TYPE(op), op, obj_id); + key = PyTuple_Pack(2, obj_id, op); Py_DECREF(obj_id); } return key; |