[Python-checkins] python/dist/src/Include compile.h, 2.37.2.9,
2.37.2.10
jhylton at users.sourceforge.net
jhylton at users.sourceforge.net
Wed Apr 21 10:44:35 EDT 2004
Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8169
Modified Files:
Tag: ast-branch
compile.h
Log Message:
Catch illegal future statements.
Remove ff_found_docstring; it's only need in one function. Shorten
name of ff_last_lineno.
Define ERR_LATE_FUTURE so that same string can be used in future.c and
newcompile.c.
Index: compile.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/compile.h,v
retrieving revision 2.37.2.9
retrieving revision 2.37.2.10
diff -C2 -d -r2.37.2.9 -r2.37.2.10
*** compile.h 26 Mar 2004 15:34:10 -0000 2.37.2.9
--- compile.h 21 Apr 2004 14:44:09 -0000 2.37.2.10
***************
*** 21,27 ****
typedef struct {
! int ff_found_docstring;
! int ff_last_lineno;
! int ff_features;
} PyFutureFeatures;
--- 21,26 ----
typedef struct {
! int ff_features; /* flags set by future statements */
! int ff_lineno; /* line number of last future statement */
} PyFutureFeatures;
***************
*** 35,38 ****
--- 34,39 ----
DL_IMPORT(PyFutureFeatures *) PyFuture_FromAST(struct _mod *, const char *);
+ #define ERR_LATE_FUTURE \
+ "from __future__ imports must occur at the beginning of the file"
#ifdef __cplusplus
More information about the Python-checkins
mailing list