From 8f2355ae1f2aba2c9bbea68f6edb7840e72c9161 Mon Sep 17 00:00:00 2001 From: Mohamed Koubaa Date: Sat, 28 Nov 2020 12:52:04 -0600 Subject: [PATCH] visit/clear --- Modules/_elementtree.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index acf4ed03836..cbc0ee93e76 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -128,6 +128,9 @@ elementtree_clear(PyObject *m) Py_CLEAR(st->comment_factory); Py_CLEAR(st->pi_factory); Py_CLEAR(st->element_type); + Py_CLEAR(st->element_iter_type); + Py_CLEAR(st->tree_builder_type); + Py_CLEAR(st->xmlparser_type); return 0; } @@ -141,6 +144,9 @@ elementtree_traverse(PyObject *m, visitproc visit, void *arg) Py_VISIT(st->comment_factory); Py_VISIT(st->pi_factory); Py_VISIT(st->element_type); + Py_VISIT(st->element_iter_type); + Py_VISIT(st->tree_builder_type); + Py_VISIT(st->xmlparser_type); return 0; }