mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
free AST's dict
This commit is contained in:
parent
4775def25d
commit
1767e0274b
2 changed files with 14 additions and 2 deletions
|
@ -460,6 +460,12 @@ typedef struct {
|
|||
PyObject *dict;
|
||||
} AST_object;
|
||||
|
||||
static void
|
||||
ast_dealloc(AST_object *self)
|
||||
{
|
||||
Py_CLEAR(self->dict);
|
||||
}
|
||||
|
||||
static int
|
||||
ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
|
||||
{
|
||||
|
@ -548,7 +554,7 @@ static PyTypeObject AST_type = {
|
|||
"_ast.AST",
|
||||
sizeof(AST_object),
|
||||
0,
|
||||
0, /* tp_dealloc */
|
||||
(destructor)ast_dealloc, /* tp_dealloc */
|
||||
0, /* tp_print */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue