summaryrefslogtreecommitdiffstats
path: root/Include/cpython
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-03-25 12:57:50 (GMT)
committerGitHub <noreply@github.com>2022-03-25 12:57:50 (GMT)
commitd7163bb35d1ed46bde9affcd4eb267dfd0b703dd (patch)
tree50ced5b75c3e1579c4e23fd7c404ac33c53b7fc3 /Include/cpython
parentb68431fadb3150134ac6ccbf501cdfeaf4c75678 (diff)
downloadcpython-d7163bb35d1ed46bde9affcd4eb267dfd0b703dd.zip
cpython-d7163bb35d1ed46bde9affcd4eb267dfd0b703dd.tar.gz
cpython-d7163bb35d1ed46bde9affcd4eb267dfd0b703dd.tar.bz2
bpo-42197: Don't create `f_locals` dictionary unless we actually need it. (GH-32055)
* `PyFrame_FastToLocalsWithError` and `PyFrame_LocalsToFast` are no longer called during profile and tracing. (Contributed by Fabio Zadrozny) * Make accesses to a frame's `f_locals` safe from C code, not relying on calls to `PyFrame_FastToLocals` or `PyFrame_LocalsToFast`. * Document new `PyFrame_GetLocals` C-API function.
Diffstat (limited to 'Include/cpython')
-rw-r--r--Include/cpython/frameobject.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/cpython/frameobject.h b/Include/cpython/frameobject.h
index 9b697fb..d54d365 100644
--- a/Include/cpython/frameobject.h
+++ b/Include/cpython/frameobject.h
@@ -23,3 +23,4 @@ PyAPI_FUNC(int) PyFrame_FastToLocalsWithError(PyFrameObject *f);
PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *);
PyAPI_FUNC(PyFrameObject *) PyFrame_GetBack(PyFrameObject *frame);
+PyAPI_FUNC(PyObject *) PyFrame_GetLocals(PyFrameObject *frame);