Skip to content

Commit e487005

Browse files
pythonGH-90699: Clear interned strings in _elementtree
Interned strings were added in pythonGH-99012
1 parent 8cdbc46 commit e487005

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Modules/_elementtree.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@ elementtree_clear(PyObject *m)
122122
Py_CLEAR(st->elementpath_obj);
123123
Py_CLEAR(st->comment_factory);
124124
Py_CLEAR(st->pi_factory);
125+
126+
// Interned strings
127+
Py_CLEAR(st->str_append);
128+
Py_CLEAR(st->str_find);
129+
Py_CLEAR(st->str_findall);
130+
Py_CLEAR(st->str_findtext);
131+
Py_CLEAR(st->str_iterfind);
132+
Py_CLEAR(st->str_tail);
133+
Py_CLEAR(st->str_text);
134+
Py_CLEAR(st->str_doctype);
125135
return 0;
126136
}
127137

0 commit comments

Comments
 (0)