Skip to content

Commit 6d668e6

Browse files
committed
Limit _PyUnicode_InternStatic to runtime initialization
1 parent bf49f61 commit 6d668e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Objects/unicodeobject.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15253,6 +15253,9 @@ intern_static(PyInterpreterState *interp, PyObject *s /* stolen */)
1525315253
void
1525415254
_PyUnicode_InternStatic(PyInterpreterState *interp, PyObject **p)
1525515255
{
15256+
// This should only be called as part of runtime initialization
15257+
assert(!Py_IsInitialized());
15258+
1525615259
*p = intern_static(interp, *p);
1525715260
assert(*p);
1525815261
}

0 commit comments

Comments
 (0)