Skip to content

Commit

Permalink
pythongh-115653: Document PyCode_GetFirstFree() (python#115654)
Browse files Browse the repository at this point in the history
Correct the return type of the PyCode_GetNumFree() documentation.
  • Loading branch information
wrongnull committed Feb 21, 2024
1 parent 77430b6 commit 10fc467
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 10fc467

Please sign in to comment.