summaryrefslogtreecommitdiff
path: root/Python/Python-ast.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-05-27 10:03:38 +0100
committerGitHub <noreply@github.com>2020-05-27 02:03:38 -0700
commit1cf15af9a6f28750f37b08c028ada31d38e818dd (patch)
tree19918a3d6cc25f3f2bcd14687be59c8926825020 /Python/Python-ast.c
parent404b23b85b17c84e022779f31fc89cb0ed0d37e8 (diff)
downloadcpython-git-1cf15af9a6f28750f37b08c028ada31d38e818dd.tar.gz
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
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r--Python/Python-ast.c1
1 files changed, 1 insertions, 0 deletions
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;
}