Skip to content

Commit

Permalink
pythongh-103906: Remove immortal refcounting in compile.c
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed Apr 27, 2023
1 parent 8a0c7f1 commit 8cdd24d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,10 +892,10 @@ static PyObject*
merge_consts_recursive(PyObject *const_cache, PyObject *o)
{
assert(PyDict_CheckExact(const_cache));
// None and Ellipsis are singleton, and key is the singleton.
// None and Ellipsis are immortal object, and key is the singleton.
// No need to merge object and key.
if (o == Py_None || o == Py_Ellipsis) {
return Py_NewRef(o);
return o;
}

PyObject *key = _PyCode_ConstantKey(o);
Expand Down

0 comments on commit 8cdd24d

Please sign in to comment.