summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-01-04 15:41:39 +0000
committerGitHub <noreply@github.com>2023-01-04 15:41:39 +0000
commit15aecf8dd70f82eb507d74fae9662072a377bdc8 (patch)
tree6afd6d35744428bafd5b64bc6fccbb830534c86e /Python/compile.c
parentc31e356a10aa60b5967b9aaf80b9984059e46461 (diff)
downloadcpython-git-15aecf8dd70f82eb507d74fae9662072a377bdc8.tar.gz
GH-100719: Remove the `co_nplaincellvars` field from code objects. (GH-100721)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index cbbdfb9e94..c2e77fefb0 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2260,7 +2260,7 @@ compiler_make_closure(struct compiler *c, location loc,
qualname = co->co_name;
if (co->co_nfreevars) {
- int i = co->co_nlocals + co->co_nplaincellvars;
+ int i = PyCode_GetFirstFree(co);
for (; i < co->co_nlocalsplus; ++i) {
/* Bypass com_addop_varname because it will generate
LOAD_DEREF but LOAD_CLOSURE is needed.