]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-101100: Fix sphinx warnings in `c-api/gcsupport.rst` (GH-114786) (#115263)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 13 Feb 2024 21:25:54 +0000 (22:25 +0100)
committerGitHub <noreply@github.com>
Tue, 13 Feb 2024 21:25:54 +0000 (14:25 -0700)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Doc/c-api/gcsupport.rst
Doc/tools/.nitignore
Misc/NEWS.d/3.12.0b1.rst

index 6b2494ee4f0ed4cec80bde9a05a3c2a7db93b539..621da3eb069949c95cee1420b12b31411dd749b7 100644 (file)
@@ -83,10 +83,15 @@ rules:
    .. versionadded:: 3.12
 
 
-.. c:function:: TYPE* PyObject_GC_Resize(TYPE, PyVarObject *op, Py_ssize_t newsize)
+.. c:macro:: PyObject_GC_Resize(TYPE, op, newsize)
 
-   Resize an object allocated by :c:macro:`PyObject_NewVar`.  Returns the
-   resized object or ``NULL`` on failure.  *op* must not be tracked by the collector yet.
+   Resize an object allocated by :c:macro:`PyObject_NewVar`.
+   Returns the resized object of type ``TYPE*`` (refers to any C type)
+   or ``NULL`` on failure.
+
+   *op* must be of type :c:expr:`PyVarObject *`
+   and must not be tracked by the collector yet.
+   *newsize* must be of type :c:type:`Py_ssize_t`.
 
 
 .. c:function:: void PyObject_GC_Track(PyObject *op)
index 36921864700e6993298e3eb6fe56b5e36c09668e..8a0b0b558eb593b77746764843e98ee0dd935e14 100644 (file)
@@ -5,7 +5,6 @@
 Doc/c-api/arg.rst
 Doc/c-api/descriptor.rst
 Doc/c-api/float.rst
-Doc/c-api/gcsupport.rst
 Doc/c-api/init.rst
 Doc/c-api/init_config.rst
 Doc/c-api/intro.rst
index c850608b8ca76867896482c34603a8a24489c1ab..3c1f61c6c65df57053466583698807e4d47fefae 100644 (file)
@@ -2371,7 +2371,7 @@ Add a new C-API function to eagerly assign a version tag to a PyTypeObject:
 .. nonce: _paFIF
 .. section: C API
 
-:c:func:`PyObject_GC_Resize` should calculate preheader size if needed.
+:c:macro:`PyObject_GC_Resize` should calculate preheader size if needed.
 Patch by Donghee Na.
 
 ..