Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-103906: Remove immortal refcounting in compile.c
  • Loading branch information
corona10 committed Apr 27, 2023
commit 8cdd24ddd7d07a1cc6dda42a202bb66b756c5f63
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.
Comment thread
corona10 marked this conversation as resolved.
Outdated
// 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