]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-101100: Fix sphinx warnings in `c-api/gcsupport.rst` (#114786)
authorNikita Sobolev <mail@sobolevn.me>
Sat, 10 Feb 2024 22:59:23 +0000 (01:59 +0300)
committerGitHub <noreply@github.com>
Sat, 10 Feb 2024 22:59:23 +0000 (15:59 -0700)
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 9db02c5c3c73c902ff60267a474fb0cec9453cc8..1d1b16166e906ced8061eecead1235631d6bb09f 100644 (file)
@@ -5,7 +5,6 @@
 Doc/c-api/descriptor.rst
 Doc/c-api/exceptions.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 211513d05d00407ad745eff8b95686ec2b9a00af..21f2c748f405481e9c4e883bda96e5f55d511c27 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.
 
 ..