summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-01 04:23:04 (GMT)
committerGitHub <noreply@github.com>2024-06-01 04:23:04 (GMT)
commit0a266f7e74ce1ff4ad6e88f05473cc6a22ab7e20 (patch)
tree679ce41bab03bcf4891f8c46fa141407a4bd7db0 /Objects
parenta5272e63efc003a30a2b603b512d367282a24209 (diff)
downloadcpython-0a266f7e74ce1ff4ad6e88f05473cc6a22ab7e20.zip
cpython-0a266f7e74ce1ff4ad6e88f05473cc6a22ab7e20.tar.gz
cpython-0a266f7e74ce1ff4ad6e88f05473cc6a22ab7e20.tar.bz2
[3.13] gh-74929: PEP 667 C API documentation (gh-119892)
* Add docs for new APIs * Add soft-deprecation notices * Add What's New porting entries * Update comments referencing `PyFrame_LocalsToFast()` to mention the proxy instead * Other related cleanups found when looking for refs to the deprecated APIs (cherry picked from commit 3859e09e3d92d004978dd838f0511364e7edfb94) Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Diffstat (limited to 'Objects')
-rw-r--r--Objects/frameobject.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 64fded8..0465aaa 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -1919,8 +1919,7 @@ frame_get_var(_PyInterpreterFrame *frame, PyCodeObject *co, int i,
}
// (likely) Otherwise it is an arg (kind & CO_FAST_LOCAL),
// with the initial value set when the frame was created...
- // (unlikely) ...or it was set to some initial value by
- // an earlier call to PyFrame_LocalsToFast().
+ // (unlikely) ...or it was set via the f_locals proxy.
}
}
}
@@ -2033,18 +2032,24 @@ PyFrame_GetVarString(PyFrameObject *frame, const char *name)
int
PyFrame_FastToLocalsWithError(PyFrameObject *f)
{
+ // Nothing to do here, as f_locals is now a write-through proxy in
+ // optimized frames. Soft-deprecated, since there's no maintenance hassle.
return 0;
}
void
PyFrame_FastToLocals(PyFrameObject *f)
{
+ // Nothing to do here, as f_locals is now a write-through proxy in
+ // optimized frames. Soft-deprecated, since there's no maintenance hassle.
return;
}
void
PyFrame_LocalsToFast(PyFrameObject *f, int clear)
{
+ // Nothing to do here, as f_locals is now a write-through proxy in
+ // optimized frames. Soft-deprecated, since there's no maintenance hassle.
return;
}