summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorBogdan Romanyuk <65823030+wrongnull@users.noreply.github.com>2024-03-19 09:20:38 (GMT)
committerGitHub <noreply@github.com>2024-03-19 09:20:38 (GMT)
commita8e93d3dca086896e668b88b6c5450eaf644c0e7 (patch)
tree4de06c7d1f39d9fb7aa8b3ef8306aa73bb09ed60 /Doc/c-api
parenta3cf0fada09b74b1a6981cc06c4dd0bb1091b092 (diff)
downloadcpython-a8e93d3dca086896e668b88b6c5450eaf644c0e7.zip
cpython-a8e93d3dca086896e668b88b6c5450eaf644c0e7.tar.gz
cpython-a8e93d3dca086896e668b88b6c5450eaf644c0e7.tar.bz2
gh-115756: make PyCode_GetFirstFree an unstable API (GH-115781)
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/code.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst
index f6fdd75..968c472 100644
--- a/Doc/c-api/code.rst
+++ b/Doc/c-api/code.rst
@@ -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,