Skip to content

Commit

Permalink
[3.12] gh-115653: Document PyCode_GetFirstFree() (GH-115654) (#115752)
Browse files Browse the repository at this point in the history
gh-115653: Document PyCode_GetFirstFree() (GH-115654)

Correct the return type of the PyCode_GetNumFree() documentation.
(cherry picked from commit 10fc467)

Co-authored-by: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com>
  • Loading branch information
miss-islington and wrongnull authored Feb 21, 2024
1 parent f1c1afd commit 8d0ec39
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Doc/c-api/code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ bound into a function.
Return true if *co* is a :ref:`code object <code-objects>`.
This function always succeeds.
.. c:function:: int PyCode_GetNumFree(PyCodeObject *co)
.. c:function:: Py_ssize_t PyCode_GetNumFree(PyCodeObject *co)
Return the number of free variables in *co*.
Return the number of free variables in a code object.
.. c:function:: int PyCode_GetFirstFree(PyCodeObject *co)
Return the position of the first free variable in a code object.
.. c:function:: PyCodeObject* PyUnstable_Code_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)
Expand Down

0 comments on commit 8d0ec39

Please sign in to comment.