summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-11-13 11:52:18 (GMT)
committerGitHub <noreply@github.com>2018-11-13 11:52:18 (GMT)
commit1a6be91e6fd65ce9cb88cbbbb193db7e92ec6076 (patch)
treeddc9692cb94ce5f3659cc4b3f24a3d6fb2632a4a /Doc/c-api
parent0d12672b30b8c6c992bef7564581117ae83e11ad (diff)
downloadcpython-1a6be91e6fd65ce9cb88cbbbb193db7e92ec6076.zip
cpython-1a6be91e6fd65ce9cb88cbbbb193db7e92ec6076.tar.gz
cpython-1a6be91e6fd65ce9cb88cbbbb193db7e92ec6076.tar.bz2
bpo-35081: Make some _PyGC macros internal (GH-10507)
* Move "GC" macros together: * PyObject_IS_GC() * _Py_AS_GC() * _PyObject_GC_IS_TRACKED() * _PyObject_GC_MAY_BE_TRACKED() * Mark other GC macros as internal (#ifdef Py_BUILD_CORE): * _PyGCHead_NEXT(g), _PyGCHead_SET_NEXT(g, p) * _PyGCHead_PREV(g), _PyGCHead_SET_PREV(g, p) * _PyGCHead_FINALIZED(g), _PyGCHead_SET_FINALIZED(g) * _PyGC_FINALIZED(o), _PyGC_SET_FINALIZED(o) * _PyObject_GC_TRACK(o), _PyObject_GC_UNTRACK(o) * _PyGC_PREV_MASK_FINALIZED * _PyGC_PREV_MASK_COLLECTING * _PyGC_PREV_SHIFT * _PyGC_PREV_MASK * Replace _PyGC_generation0 with _PyRuntime.gc.generation0 * _queuemodule.c: replace _PyObject_GC_UNTRACK() with with PyObject_GC_UnTrack() * Document that _PyObject_GC_TRACK() _PyObject_GC_UNTRACK() macros have been removed from the public C API.
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/gcsupport.rst11
1 files changed, 3 insertions, 8 deletions
diff --git a/Doc/c-api/gcsupport.rst b/Doc/c-api/gcsupport.rst
index 7f54b6a..b739aac 100644
--- a/Doc/c-api/gcsupport.rst
+++ b/Doc/c-api/gcsupport.rst
@@ -61,11 +61,6 @@ Constructors for container types must conform to two rules:
end of the constructor.
-.. c:function:: void _PyObject_GC_TRACK(PyObject *op)
-
- A macro version of :c:func:`PyObject_GC_Track`. It should not be used for
- extension modules.
-
Similarly, the deallocator for the object must conform to a similar pair of
rules:
@@ -90,10 +85,10 @@ rules:
the fields used by the :c:member:`~PyTypeObject.tp_traverse` handler become invalid.
-.. c:function:: void _PyObject_GC_UNTRACK(PyObject *op)
+.. versionchanged:: 3.8
- A macro version of :c:func:`PyObject_GC_UnTrack`. It should not be used for
- extension modules.
+ The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros
+ have been removed from the public C API.
The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function parameter of this type: