summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.11.rst
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-04-08 11:18:57 (GMT)
committerGitHub <noreply@github.com>2022-04-08 11:18:57 (GMT)
commit5b4a4b6f0905c60514528b454af43aeea058b5a2 (patch)
treeab395cfccfecb94af2db5055f7477ddb39a9ea3e /Doc/whatsnew/3.11.rst
parentf4b328e2bbbcc1096a28e903f07868b425397767 (diff)
downloadcpython-5b4a4b6f0905c60514528b454af43aeea058b5a2.zip
cpython-5b4a4b6f0905c60514528b454af43aeea058b5a2.tar.gz
cpython-5b4a4b6f0905c60514528b454af43aeea058b5a2.tar.bz2
Add new PyFrame_GetLasti C-API function (GH-32413)
Diffstat (limited to 'Doc/whatsnew/3.11.rst')
-rw-r--r--Doc/whatsnew/3.11.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index bc4a195..2da01d8 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -1121,7 +1121,7 @@ New Features
* Add new functions to get frame object attributes:
:c:func:`PyFrame_GetBuiltins`, :c:func:`PyFrame_GetGenerator`,
- :c:func:`PyFrame_GetGlobals`.
+ :c:func:`PyFrame_GetGlobals`, :c:func:`PyFrame_GetLasti`.
Porting to Python 3.11
----------------------
@@ -1246,9 +1246,9 @@ Porting to Python 3.11
* ``f_gen``: use :c:func:`PyFrame_GetGenerator`.
* ``f_globals``: use :c:func:`PyFrame_GetGlobals`.
* ``f_iblock``: removed.
- * ``f_lasti``: use ``PyObject_GetAttrString((PyObject*)frame, "f_lasti")``.
+ * ``f_lasti``: use :c:func:`PyFrame_GetLasti`.
Code using ``f_lasti`` with ``PyCode_Addr2Line()`` should use
- :c:func:`PyFrame_GetLineNumber` instead.
+ :c:func:`PyFrame_GetLineNumber` instead; it may be faster.
* ``f_lineno``: use :c:func:`PyFrame_GetLineNumber`
* ``f_locals``: use :c:func:`PyFrame_GetLocals`.
* ``f_stackdepth``: removed.