From 1cf15af9a6f28750f37b08c028ada31d38e818dd Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Wed, 27 May 2020 10:03:38 +0100 Subject: bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for PyType_FromSpec types (reverts GH-19414) (GH-20264) Heap types now always visit the type in tp_traverse. See added docs for details. This reverts commit 0169d3003be3d072751dd14a5c84748ab63a249f. Automerge-Triggered-By: @encukou --- Python/Python-ast.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Python/Python-ast.c') diff --git a/Python/Python-ast.c b/Python/Python-ast.c index d2edf74c81..694987dd07 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -1109,6 +1109,7 @@ ast_dealloc(AST_object *self) static int ast_traverse(AST_object *self, visitproc visit, void *arg) { + Py_VISIT(Py_TYPE(self)); Py_VISIT(self->dict); return 0; } -- cgit v1.2.1