[Python-checkins] python/dist/src/Include parsetok.h,2.20,2.21 pythonrun.h,2.61,2.62
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Thu, 13 Feb 2003 14:08:25 -0800
Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv26189/Include
Modified Files:
parsetok.h pythonrun.h
Log Message:
- Finally fixed the bug in compile() and exec where a string ending
with an indented code block but no newline would raise SyntaxError.
This would have been a four-line change in parsetok.c... Except
codeop.py depends on this behavior, so a compilation flag had to be
invented that causes the tokenizer to revert to the old behavior;
this required extra changes to 2 .h files, 2 .c files, and 2 .py
files. (Fixes SF bug #501622.)
Index: parsetok.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/parsetok.h,v
retrieving revision 2.20
retrieving revision 2.21
diff -C2 -d -r2.20 -r2.21
*** parsetok.h 11 Dec 2002 14:04:57 -0000 2.20
--- parsetok.h 13 Feb 2003 22:07:52 -0000 2.21
***************
*** 22,25 ****
--- 22,27 ----
#endif
+ #define PyPARSE_DONT_IMPLY_DEDENT 0x0002
+
PyAPI_FUNC(node *) PyParser_ParseString(const char *, grammar *, int,
perrdetail *);
Index: pythonrun.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pythonrun.h,v
retrieving revision 2.61
retrieving revision 2.62
diff -C2 -d -r2.61 -r2.62
*** pythonrun.h 10 Feb 2003 08:21:06 -0000 2.61
--- pythonrun.h 13 Feb 2003 22:07:52 -0000 2.62
***************
*** 11,14 ****
--- 11,15 ----
#define PyCF_MASK_OBSOLETE (CO_GENERATOR_ALLOWED | CO_NESTED)
#define PyCF_SOURCE_IS_UTF8 0x0100
+ #define PyCF_DONT_IMPLY_DEDENT 0x0200
typedef struct {