Skip to content
Prev Previous commit
Next Next commit
Make interned strings immortal.
  • Loading branch information
ericsnowcurrently committed Mar 20, 2023
commit 16ed5e0bfb1ff2807a9e00483524afac39712f08
3 changes: 2 additions & 1 deletion Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -14672,7 +14672,8 @@ PyUnicode_InternInPlace(PyObject **p)
return;
}

// XXX Immortalize the object.
/* Immortalize the object. */
_Py_SetImmortal(s);

/* The two references in interned dict (key and value) are not counted by
refcnt. unicode_dealloc() and _PyUnicode_ClearInterned() take care of
Expand Down