Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 19252:fbf1ae769306 legacy-trunk
Fix SF bug [ #450909 ] __future__.division fails at prompt
When code is compiled and compiler flags are passed in, be sure to
update cf_flags with any features defined by future statements in the
compiled code.
| author | Jeremy Hylton <jeremy@alum.mit.edu> |
|---|---|
| date | Tue, 14 Aug 2001 20:01:59 +0000 |
| parents | 30f8b654c2e5 |
| children | 7257e87e0720 |
line wrap: on
line diff
--- a/Python/compile.c Tue Aug 14 20:00:33 2001 +0000 +++ b/Python/compile.c Tue Aug 14 20:01:59 2001 +0000 @@ -4027,8 +4027,12 @@ com_free(&sc); return NULL; } - if (flags) - sc.c_future->ff_features |= flags->cf_flags; + if (flags) { + int merged = sc.c_future->ff_features | + flags->cf_flags; + sc.c_future->ff_features = merged; + flags->cf_flags = merged; + } if (symtable_build(&sc, n) < 0) { com_free(&sc); return NULL;
