summaryrefslogtreecommitdiffstats
path: root/Objects/codeobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2021-06-23 16:51:44 (GMT)
committerGitHub <noreply@github.com>2021-06-23 16:51:44 (GMT)
commit769d7d0c66c5b86e2dd29b9ce67ac2daaab1bb38 (patch)
tree48ceed799fea9009441a6eb71c97cdee08e16eb5 /Objects/codeobject.c
parent34356a0a4bad0be124ae892cda6c30a38f5f1061 (diff)
downloadcpython-769d7d0c66c5b86e2dd29b9ce67ac2daaab1bb38.zip
cpython-769d7d0c66c5b86e2dd29b9ce67ac2daaab1bb38.tar.gz
cpython-769d7d0c66c5b86e2dd29b9ce67ac2daaab1bb38.tar.bz2
bpo-43693 Get rid of CO_NOFREE -- it's unused (GH-26839)
All uses of this flag are either setting it or in doc or tests for it. So we should be able to get rid of it completely.
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r--Objects/codeobject.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 99199cc..88e09ac 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -372,13 +372,6 @@ _PyCode_New(struct _PyCodeConstructor *con)
}
init_code(co, con);
- /* Check for any inner or outer closure references */
- if (!co->co_ncellvars && !co->co_nfreevars) {
- co->co_flags |= CO_NOFREE;
- } else {
- co->co_flags &= ~CO_NOFREE;
- }
-
return co;
}