summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-01-04 15:41:39 (GMT)
committerGitHub <noreply@github.com>2023-01-04 15:41:39 (GMT)
commit15aecf8dd70f82eb507d74fae9662072a377bdc8 (patch)
tree6afd6d35744428bafd5b64bc6fccbb830534c86e /Python/bytecodes.c
parentc31e356a10aa60b5967b9aaf80b9984059e46461 (diff)
downloadcpython-15aecf8dd70f82eb507d74fae9662072a377bdc8.zip
cpython-15aecf8dd70f82eb507d74fae9662072a377bdc8.tar.gz
cpython-15aecf8dd70f82eb507d74fae9662072a377bdc8.tar.bz2
GH-100719: Remove the `co_nplaincellvars` field from code objects. (GH-100721)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index 839fac3..dec122a 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -1357,8 +1357,8 @@ dummy_func(
PyCodeObject *co = frame->f_code;
assert(PyFunction_Check(frame->f_funcobj));
PyObject *closure = ((PyFunctionObject *)frame->f_funcobj)->func_closure;
- int offset = co->co_nlocals + co->co_nplaincellvars;
assert(oparg == co->co_nfreevars);
+ int offset = co->co_nlocalsplus - oparg;
for (int i = 0; i < oparg; ++i) {
PyObject *o = PyTuple_GET_ITEM(closure, i);
frame->localsplus[offset + i] = Py_NewRef(o);