mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
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 commit0169d3003b
. Automerge-Triggered-By: @encukou (cherry picked from commit1cf15af9a6
) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
parent
1d82f00367
commit
bcbe5c59dd
12 changed files with 87 additions and 94 deletions
1
Python/Python-ast.c
generated
1
Python/Python-ast.c
generated
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue