diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-24 18:54:07 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-24 18:54:07 (GMT) |
commit | 067cbd02bf2d9dba35fb73edc57afecc759411fd (patch) | |
tree | 7453e06dcfe548561a3123139f3cc963bfac18cd /Objects/codeobject.c | |
parent | c3858bd7c6e6ef37978b8483a9fe594f29b4b2de (diff) | |
parent | 4102d25b7eef868519b4c9b398690313cd36ef66 (diff) | |
download | cpython-067cbd02bf2d9dba35fb73edc57afecc759411fd.zip cpython-067cbd02bf2d9dba35fb73edc57afecc759411fd.tar.gz cpython-067cbd02bf2d9dba35fb73edc57afecc759411fd.tar.bz2 |
Issue #29337: Fixed possible BytesWarning when compare the code objects.
Warnings could be emitted at compile time.
Diffstat (limited to 'Objects/codeobject.c')
-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 0857554..b1e8ec9 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -550,7 +550,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)) { @@ -584,7 +584,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; } @@ -595,7 +595,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; |