diff options
author | Mark Shannon <mark@hotpy.org> | 2023-01-04 15:41:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-04 15:41:39 +0000 |
commit | 15aecf8dd70f82eb507d74fae9662072a377bdc8 (patch) | |
tree | 6afd6d35744428bafd5b64bc6fccbb830534c86e /Python/compile.c | |
parent | c31e356a10aa60b5967b9aaf80b9984059e46461 (diff) | |
download | cpython-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.c | 2 |
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. |