mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-107073: Make PyObject_VisitManagedDict() public (#108763)
Make PyObject_VisitManagedDict() and PyObject_ClearManagedDict() functions public in Python 3.13 C API. * Rename _PyObject_VisitManagedDict() to PyObject_VisitManagedDict(). * Rename _PyObject_ClearManagedDict() to PyObject_ClearManagedDict(). * Document these functions.
This commit is contained in:
parent
6387b5313c
commit
fc2cb86d21
12 changed files with 77 additions and 24 deletions
|
|
@ -805,13 +805,13 @@ static int
|
|||
heapmanaged_traverse(HeapCTypeObject *self, visitproc visit, void *arg)
|
||||
{
|
||||
Py_VISIT(Py_TYPE(self));
|
||||
return _PyObject_VisitManagedDict((PyObject *)self, visit, arg);
|
||||
return PyObject_VisitManagedDict((PyObject *)self, visit, arg);
|
||||
}
|
||||
|
||||
static int
|
||||
heapmanaged_clear(HeapCTypeObject *self)
|
||||
{
|
||||
_PyObject_ClearManagedDict((PyObject *)self);
|
||||
PyObject_ClearManagedDict((PyObject *)self);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -819,7 +819,7 @@ static void
|
|||
heapmanaged_dealloc(HeapCTypeObject *self)
|
||||
{
|
||||
PyTypeObject *tp = Py_TYPE(self);
|
||||
_PyObject_ClearManagedDict((PyObject *)self);
|
||||
PyObject_ClearManagedDict((PyObject *)self);
|
||||
PyObject_GC_UnTrack(self);
|
||||
PyObject_GC_Del(self);
|
||||
Py_DECREF(tp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue