mirror of
https://github.com/python/cpython.git
synced 2026-04-20 02:40:59 +00:00
gh-148274: properly handle result from PyObject_VisitManagedDict (#148275)
This commit is contained in:
parent
8c524503cd
commit
ee2775cfae
3 changed files with 6 additions and 12 deletions
|
|
@ -944,8 +944,7 @@ FutureObj_traverse(PyObject *op, visitproc visit, void *arg)
|
|||
Py_VISIT(fut->fut_cancel_msg);
|
||||
Py_VISIT(fut->fut_cancelled_exc);
|
||||
Py_VISIT(fut->fut_awaited_by);
|
||||
PyObject_VisitManagedDict((PyObject *)fut, visit, arg);
|
||||
return 0;
|
||||
return PyObject_VisitManagedDict((PyObject *)fut, visit, arg);
|
||||
}
|
||||
|
||||
/*[clinic input]
|
||||
|
|
@ -2425,8 +2424,7 @@ TaskObj_traverse(PyObject *op, visitproc visit, void *arg)
|
|||
Py_VISIT(fut->fut_cancel_msg);
|
||||
Py_VISIT(fut->fut_cancelled_exc);
|
||||
Py_VISIT(fut->fut_awaited_by);
|
||||
PyObject_VisitManagedDict((PyObject *)fut, visit, arg);
|
||||
return 0;
|
||||
return PyObject_VisitManagedDict((PyObject *)fut, visit, arg);
|
||||
}
|
||||
|
||||
/*[clinic input]
|
||||
|
|
|
|||
|
|
@ -3280,9 +3280,8 @@ typedef struct {
|
|||
} ManagedDictObject;
|
||||
|
||||
int ManagedDict_traverse(PyObject *self, visitproc visit, void *arg) {
|
||||
PyObject_VisitManagedDict(self, visit, arg);
|
||||
Py_VISIT(Py_TYPE(self));
|
||||
return 0;
|
||||
return PyObject_VisitManagedDict(self, visit, arg);
|
||||
}
|
||||
|
||||
int ManagedDict_clear(PyObject *self) {
|
||||
|
|
|
|||
|
|
@ -500,8 +500,7 @@ typevar_traverse(PyObject *self, visitproc visit, void *arg)
|
|||
Py_VISIT(tv->evaluate_constraints);
|
||||
Py_VISIT(tv->default_value);
|
||||
Py_VISIT(tv->evaluate_default);
|
||||
PyObject_VisitManagedDict(self, visit, arg);
|
||||
return 0;
|
||||
return PyObject_VisitManagedDict(self, visit, arg);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -1195,8 +1194,7 @@ paramspec_traverse(PyObject *self, visitproc visit, void *arg)
|
|||
Py_VISIT(ps->bound);
|
||||
Py_VISIT(ps->default_value);
|
||||
Py_VISIT(ps->evaluate_default);
|
||||
PyObject_VisitManagedDict(self, visit, arg);
|
||||
return 0;
|
||||
return PyObject_VisitManagedDict(self, visit, arg);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -1692,8 +1690,7 @@ typevartuple_traverse(PyObject *self, visitproc visit, void *arg)
|
|||
Py_VISIT(tvt->name);
|
||||
Py_VISIT(tvt->default_value);
|
||||
Py_VISIT(tvt->evaluate_default);
|
||||
PyObject_VisitManagedDict(self, visit, arg);
|
||||
return 0;
|
||||
return PyObject_VisitManagedDict(self, visit, arg);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue