diff options
author | da-woods <dw-git@d-woods.co.uk> | 2023-07-30 08:48:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-30 08:48:01 (GMT) |
commit | ff5dd9d9db0d036dbc65b7c5de49c6f3117a2355 (patch) | |
tree | 9a3ed29e288f9d86f8a548c3afca412abb7da858 | |
parent | ddccdbfc403b3e45693cb307fc05ea15b0c642cb (diff) | |
download | cpython-ff5dd9d9db0d036dbc65b7c5de49c6f3117a2355.zip cpython-ff5dd9d9db0d036dbc65b7c5de49c6f3117a2355.tar.gz cpython-ff5dd9d9db0d036dbc65b7c5de49c6f3117a2355.tar.bz2 |
[3.11] Fix the documentation for PyCode_New add qualname parameter (GH-107186) (#107454)
[3.11] Fix the documentation for PyCode_New add `qualname` parameter (GH-107186).
(cherry picked from commit f2abeb590dae5918388f91b60b31f040d44218f0)
-rw-r--r-- | Doc/c-api/code.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst index ee39f2a..33682d3 100644 --- a/Doc/c-api/code.rst +++ b/Doc/c-api/code.rst @@ -33,7 +33,7 @@ bound into a function. Return the number of free variables in *co*. -.. c:function:: PyCodeObject* PyCode_New(int argcount, 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) +.. c:function:: PyCodeObject* PyCode_New(int argcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, PyObject *qualname, int firstlineno, PyObject *linetable, PyObject *exceptiontable) Return a new code object. If you need a dummy code object to create a frame, use :c:func:`PyCode_NewEmpty` instead. Calling :c:func:`PyCode_New` directly @@ -43,9 +43,9 @@ bound into a function. execution or VM crashes. Use this function only with extreme care. .. versionchanged:: 3.11 - Added ``exceptiontable`` parameter. + Added ``qualname`` and ``exceptiontable`` parameters. -.. c:function:: PyCodeObject* PyCode_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) +.. c:function:: PyCodeObject* PyCode_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, PyObject *qualname, 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. @@ -53,7 +53,7 @@ bound into a function. .. versionadded:: 3.8 .. versionchanged:: 3.11 - Added ``exceptiontable`` parameter. + Added ``qualname`` and ``exceptiontable`` parameters. .. c:function:: PyCodeObject* PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno) |