Skip to content

Commit 4821f08

Browse files
authored
gh-101100: Fix sphinx warnings in c-api/gcsupport.rst (#114786)
1 parent b70a68f commit 4821f08

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Doc/c-api/gcsupport.rst

+8-3
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,15 @@ rules:
8383
.. versionadded:: 3.12
8484
8585
86-
.. c:function:: TYPE* PyObject_GC_Resize(TYPE, PyVarObject *op, Py_ssize_t newsize)
86+
.. c:macro:: PyObject_GC_Resize(TYPE, op, newsize)
8787
88-
Resize an object allocated by :c:macro:`PyObject_NewVar`. Returns the
89-
resized object or ``NULL`` on failure. *op* must not be tracked by the collector yet.
88+
Resize an object allocated by :c:macro:`PyObject_NewVar`.
89+
Returns the resized object of type ``TYPE*`` (refers to any C type)
90+
or ``NULL`` on failure.
91+
92+
*op* must be of type :c:expr:`PyVarObject *`
93+
and must not be tracked by the collector yet.
94+
*newsize* must be of type :c:type:`Py_ssize_t`.
9095
9196
9297
.. c:function:: void PyObject_GC_Track(PyObject *op)

Doc/tools/.nitignore

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
Doc/c-api/descriptor.rst
66
Doc/c-api/exceptions.rst
77
Doc/c-api/float.rst
8-
Doc/c-api/gcsupport.rst
98
Doc/c-api/init.rst
109
Doc/c-api/init_config.rst
1110
Doc/c-api/intro.rst

Misc/NEWS.d/3.12.0b1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2371,7 +2371,7 @@ Add a new C-API function to eagerly assign a version tag to a PyTypeObject:
23712371
.. nonce: _paFIF
23722372
.. section: C API
23732373
2374-
:c:func:`PyObject_GC_Resize` should calculate preheader size if needed.
2374+
:c:macro:`PyObject_GC_Resize` should calculate preheader size if needed.
23752375
Patch by Donghee Na.
23762376

23772377
..

0 commit comments

Comments
 (0)