summaryrefslogtreecommitdiffstats
path: root/Python/generated_cases.c.h
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/generated_cases.c.h
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/generated_cases.c.h')
-rw-r--r--Python/generated_cases.c.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index ed89e90..3218bd0 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -1575,8 +1575,8 @@
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);