diff options
| author | Victor Stinner <vstinner@python.org> | 2022-11-08 17:40:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-08 17:40:27 +0100 |
| commit | 4d5fcca273b24a5566f1507758e5aae60cdf8a98 (patch) | |
| tree | ac00d021776bd95cddd48ca272e07d8711d73922 /Include/cpython | |
| parent | acf4d5d5bdecbc8756276731e09bae245d88518d (diff) | |
| download | cpython-git-4d5fcca273b24a5566f1507758e5aae60cdf8a98.tar.gz | |
gh-91248: Add PyFrame_GetVar() function (#95712)
Add PyFrame_GetVar() and PyFrame_GetVarString() functions to get a
frame variable by its name.
Move PyFrameObject C API tests from test_capi to test_frame.
Diffstat (limited to 'Include/cpython')
| -rw-r--r-- | Include/cpython/pyframe.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/cpython/pyframe.h b/Include/cpython/pyframe.h index 1dc634ccee..6ec292718a 100644 --- a/Include/cpython/pyframe.h +++ b/Include/cpython/pyframe.h @@ -14,4 +14,5 @@ PyAPI_FUNC(PyObject *) PyFrame_GetBuiltins(PyFrameObject *frame); PyAPI_FUNC(PyObject *) PyFrame_GetGenerator(PyFrameObject *frame); PyAPI_FUNC(int) PyFrame_GetLasti(PyFrameObject *frame); - +PyAPI_FUNC(PyObject*) PyFrame_GetVar(PyFrameObject *frame, PyObject *name); +PyAPI_FUNC(PyObject*) PyFrame_GetVarString(PyFrameObject *frame, const char *name); |
