mirror of
https://github.com/python/cpython.git
synced 2026-05-06 12:49:07 -04:00
[3.14] gh-148274: properly handle result from PyObject_VisitManagedDict (GH-148275) (#148295)
gh-148274: properly handle result from `PyObject_VisitManagedDict` (GH-148275)
(cherry picked from commit ee2775cfae)
Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
This commit is contained in:
committed by
GitHub
parent
571c337a5d
commit
bb78ec8fa8
@@ -955,8 +955,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]
|
||||
@@ -2445,8 +2444,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]
|
||||
|
||||
@@ -3203,9 +3203,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) {
|
||||
|
||||
@@ -498,8 +498,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
|
||||
@@ -1193,8 +1192,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
|
||||
@@ -1690,8 +1688,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
|
||||
|
||||
Reference in New Issue
Block a user