[Python-checkins] CVS: python/dist/src/Python compile.c,2.216,2.217
Jeremy Hylton
jhylton@users.sourceforge.net
Tue, 14 Aug 2001 13:02:01 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv24143
Modified Files:
compile.c
Log Message:
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.
Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.216
retrieving revision 2.217
diff -C2 -d -r2.216 -r2.217
*** compile.c 2001/08/12 01:54:38 2.216
--- compile.c 2001/08/14 20:01:59 2.217
***************
*** 4028,4033 ****
return NULL;
}
! if (flags)
! sc.c_future->ff_features |= flags->cf_flags;
if (symtable_build(&sc, n) < 0) {
com_free(&sc);
--- 4028,4037 ----
return NULL;
}
! 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);