summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 6ee8ae3..d3898fb 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2928,13 +2928,10 @@ PyEval_MergeCompilerFlags(PyCompilerFlags *cf)
if (current_frame != NULL) {
const int codeflags = current_frame->f_code->co_flags;
- if (codeflags & CO_NESTED) {
+ const int compilerflags = codeflags & PyCF_MASK;
+ if (compilerflags) {
result = 1;
- cf->cf_flags |= CO_NESTED;
- }
- if (codeflags & CO_GENERATOR_ALLOWED) {
- result = 1;
- cf->cf_flags |= CO_GENERATOR_ALLOWED;
+ cf->cf_flags |= compilerflags;
}
}
return result;