diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-24 18:49:26 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-24 18:49:26 (GMT) |
commit | 713640c4c95df999957b5366fb8cd7f443906858 (patch) | |
tree | 810a234869418937b9d5d9df09605ff24a695c02 /Objects/codeobject.c | |
parent | ef107ee7a0a8ee27b0a54c542e3918807c981f83 (diff) | |
download | cpython-713640c4c95df999957b5366fb8cd7f443906858.zip cpython-713640c4c95df999957b5366fb8cd7f443906858.tar.gz cpython-713640c4c95df999957b5366fb8cd7f443906858.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 c334626..2f1bef2 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -521,7 +521,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)) { @@ -555,7 +555,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; } @@ -566,7 +566,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; |