Skip to content

Commit 16333ad

Browse files
author
christian.heimes
committed
Merged revisions 61954,61956-61957 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r61954 | christian.heimes | 2008-03-26 23:20:26 +0100 (Wed, 26 Mar 2008) | 1 line Surround p_flags access with #ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD ........ r61956 | christian.heimes | 2008-03-26 23:51:58 +0100 (Wed, 26 Mar 2008) | 1 line Initialize PyCompilerFlags cf_flags with 0 ........ r61957 | christian.heimes | 2008-03-26 23:55:31 +0100 (Wed, 26 Mar 2008) | 1 line I forgot to svn add the future test ........ git-svn-id: http://svn.python.org/projects/python/branches/py3k@61960 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 07f9adf commit 16333ad

4 files changed

Lines changed: 14 additions & 0 deletions

File tree

Lib/test/test_future4.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from __future__ import print_function
2+
from __future__ import unicode_literals
3+
4+
import unittest
5+
from test import test_support
6+
7+
def test_main():
8+
pass
9+
10+
if __name__ == "__main__":
11+
test_main()

Parser/parsetok.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
225225
}
226226
else
227227
n = NULL;
228+
228229
#ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
229230
*flags = ps->p_flags;
230231
#endif

Python/import.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,7 @@ parse_source_module(const char *pathname, FILE *fp)
826826
if (arena == NULL)
827827
return NULL;
828828

829+
flags.cf_flags = 0;
829830
mod = PyParser_ASTFromFile(fp, pathname, NULL,
830831
Py_file_input, 0, 0, &flags,
831832
NULL, arena);

Python/pythonrun.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,6 +1568,7 @@ Py_SymtableString(const char *str, const char *filename, int start)
15681568
if (arena == NULL)
15691569
return NULL;
15701570

1571+
flags.cf_flags = 0;
15711572
mod = PyParser_ASTFromString(str, filename, start, &flags, arena);
15721573
if (mod == NULL) {
15731574
PyArena_Free(arena);

0 commit comments

Comments
 (0)