Skip to content

Commit 13f3b8f

Browse files
Make interned strings immortal.
1 parent 8d015fa commit 13f3b8f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Objects/unicodeobject.c

+3
Original file line numberDiff line numberDiff line change
@@ -14622,6 +14622,9 @@ PyUnicode_InternInPlace(PyObject **p)
1462214622
return;
1462314623
}
1462414624

14625+
/* Immortalize the object. */
14626+
_Py_SetImmortal(s);
14627+
1462514628
/* The two references in interned dict (key and value) are not counted by
1462614629
refcnt. unicode_dealloc() and _PyUnicode_ClearInterned() take care of
1462714630
this. */

0 commit comments

Comments
 (0)