summaryrefslogtreecommitdiffstats
path: root/Parser/pegen.c
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/pegen.c')
-rw-r--r--Parser/pegen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Parser/pegen.c b/Parser/pegen.c
index 009e5ba..6efb547 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -528,7 +528,8 @@ _PyPegen_new_identifier(Parser *p, const char *n)
}
id = id2;
}
- PyUnicode_InternInPlace(&id);
+ PyInterpreterState *interp = _PyInterpreterState_GET();
+ _PyUnicode_InternImmortal(interp, &id);
if (_PyArena_AddPyObject(p->arena, id) < 0)
{
Py_DECREF(id);