8000 gh-115756: make PyCode_GetFirstFree an unstable API by wrongnull · Pull Request #115781 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-115756: make PyCode_GetFirstFree an unstable API #115781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make necessary changes in a documentation
  • Loading branch information
wrongnull committed Feb 22, 2024
commit 001fe51234cf6d8662f1c92c11479a7540ccc6c4
8 changes: 7 additions & 1 deletion Doc/c-api/code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ bound into a function.

Return the number of free variables in a code object.

.. c:function:: int PyCode_GetFirstFree(PyCodeObject *co)
.. c:function:: int PyUnstable_Code_GetFirstFree(PyCodeObject *co)

Return the position of the first free variable in a code object.

.. versionchanged:: 3.13

Renamed from ``PyCode_GetFirstFree`` as part of :ref:`unstable-c-api`.
The old name is deprecated, but will remain available until the
signature changes again.

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

Return a new code object. If you need a dummy code object to create a frame,
Expand Down
0