]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-101100: Fix sphinx warnings in `c-api/gcsupport.rst` (GH-114786) (#115430)
authorHugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Wed, 14 Feb 2024 14:32:58 +0000 (16:32 +0200)
committerGitHub <noreply@github.com>
Wed, 14 Feb 2024 14:32:58 +0000 (16:32 +0200)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Doc/c-api/gcsupport.rst
Doc/tools/.nitignore

index 6bdbb008f8e74a0b94ce628e6f7c6d7c833706a1..c147e6dc23fbcba7d9ed6ea4de94396795133f6d 100644 (file)
@@ -64,10 +64,15 @@ rules:
    :c:macro:`Py_TPFLAGS_HAVE_GC` flag set.
 
 
-.. 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 9e64e2424c0d4899dcea8703a2deee769ce4bc70..5aad36e533790b8b527ac34be93a02a5c7392353 100644 (file)
@@ -4,7 +4,6 @@
 
 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