[3.12] gh-107298: Fix Sphinx warnings in the C API doc (GH-107302) (GH-107375)

(cherry picked from commit 391e03fa05)

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Serhiy Storchaka 2023-07-28 09:40:16 +03:00 committed by GitHub
parent 4f72a9a2e0
commit ef7422a1b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 29 additions and 37 deletions

View file

@ -39,7 +39,7 @@ bound into a function.
use :c:func:`PyCode_NewEmpty` instead.
Since the definition of the bytecode changes often, calling
:c:func:`PyCode_New` directly can bind you to a precise Python version.
:c:func:`PyUnstable_Code_New` directly can bind you to a precise Python version.
The many arguments of this function are inter-dependent in complex
ways, meaning that subtle changes to values are likely to result in incorrect
@ -58,8 +58,8 @@ bound into a function.
.. c:function:: PyCodeObject* PyUnstable_Code_NewWithPosOnlyArgs(int argcount, int posonlyargcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, PyObject *linetable, PyObject *exceptiontable)
Similar to :c:func:`PyCode_New`, but with an extra "posonlyargcount" for positional-only arguments.
The same caveats that apply to ``PyCode_New`` also apply to this function.
Similar to :c:func:`PyUnstable_Code_New`, but with an extra "posonlyargcount" for positional-only arguments.
The same caveats that apply to ``PyUnstable_Code_New`` also apply to this function.
.. index:: single: PyCode_NewWithPosOnlyArgs