gh-101100: Fix sphinx warnings in c-api/gcsupport.rst (#114786)

This commit is contained in:
Nikita Sobolev 2024-02-11 01:59:23 +03:00 committed by GitHub
parent b70a68fbd6
commit 4821f08674
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 5 deletions

View 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)

View 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

View 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.
..