[Python-checkins] GH-88756: Update docs for PEP 523 eval function type. (GH-91788)

markshannon webhook-mailer at python.org
Thu Apr 21 13:14:10 EDT 2022


https://github.com/python/cpython/commit/5974827c71d884bb3cc58f07a9eaefafe0cbaa6e
commit: 5974827c71d884bb3cc58f07a9eaefafe0cbaa6e
branch: main
author: Mark Shannon <mark at hotpy.org>
committer: markshannon <mark at hotpy.org>
date: 2022-04-21T18:14:01+01:00
summary:

GH-88756: Update docs for PEP 523 eval function type. (GH-91788)

files:
M Doc/c-api/init.rst
M Doc/whatsnew/3.11.rst

diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst
index 3fda9c3af4d2a..9d38fb47d10d6 100644
--- a/Doc/c-api/init.rst
+++ b/Doc/c-api/init.rst
@@ -1228,7 +1228,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
 
    .. versionadded:: 3.8
 
-.. c:type:: PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, PyFrameObject *frame, int throwflag)
+.. c:type:: PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
 
    Type of a frame evaluation function.
 
@@ -1238,6 +1238,9 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
    .. versionchanged:: 3.9
       The function now takes a *tstate* parameter.
 
+   .. versionchanged:: 3.11
+      The *frame* parameter changed from ``PyFrameObject*`` to ``_PyInterpreterFrame*``.
+
 .. c:function:: _PyFrameEvalFunction _PyInterpreterState_GetEvalFrameFunc(PyInterpreterState *interp)
 
    Get the frame evaluation function.
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 6540a255a0ed8..8d74c9bbebad8 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -1155,6 +1155,10 @@ C API Changes
   be used for ``size``.
   (Contributed by Kumar Aditya in :issue:`46608`.)
 
+* :c:func:`_PyFrameEvalFunction` now takes ``_PyInterpreterFrame*``
+  as its second parameter, instead of ``PyFrameObject*``.
+  See :pep:`523` for more details of how to use this function pointer type.
+
 New Features
 ------------
 



More information about the Python-checkins mailing list