Skip to content

Commit

Permalink
pythonGH-90699: Clear interned strings in _elementtree
Browse files Browse the repository at this point in the history
Interned strings were added in pythonGH-99012
  • Loading branch information
erlend-aasland committed Jan 20, 2023
1 parent 8cdbc46 commit e487005
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Modules/_elementtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ elementtree_clear(PyObject *m)
Py_CLEAR(st->elementpath_obj);
Py_CLEAR(st->comment_factory);
Py_CLEAR(st->pi_factory);

// Interned strings
Py_CLEAR(st->str_append);
Py_CLEAR(st->str_find);
Py_CLEAR(st->str_findall);
Py_CLEAR(st->str_findtext);
Py_CLEAR(st->str_iterfind);
Py_CLEAR(st->str_tail);
Py_CLEAR(st->str_text);
Py_CLEAR(st->str_doctype);
return 0;
}

Expand Down

0 comments on commit e487005

Please sign in to comment.