[Python-checkins] python/dist/src/Modules parsermodule.c,2.74,2.75

mwh@users.sourceforge.net mwh@users.sourceforge.net
Wed, 29 Jan 2003 06:20:25 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv675/Modules

Modified Files:
	parsermodule.c 
Log Message:
Teach the parsermodule about floor division.  Fixes

[ 676521 ] parser module validation failure

bugfix candidate.


Index: parsermodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v
retrieving revision 2.74
retrieving revision 2.75
diff -C2 -d -r2.74 -r2.75
*** parsermodule.c	31 Dec 2002 18:17:43 -0000	2.74
--- parsermodule.c	29 Jan 2003 14:20:22 -0000	2.75
***************
*** 1441,1444 ****
--- 1441,1445 ----
                     || strcmp(s, "*=") == 0
                     || strcmp(s, "/=") == 0
+                    || strcmp(s, "//=") == 0
                     || strcmp(s, "%=") == 0
                     || strcmp(s, "&=") == 0
***************
*** 2096,2099 ****
--- 2097,2101 ----
          res = (((TYPE(CHILD(tree, pos)) == STAR)
                 || (TYPE(CHILD(tree, pos)) == SLASH)
+                || (TYPE(CHILD(tree, pos)) == DOUBLESLASH)
                 || (TYPE(CHILD(tree, pos)) == PERCENT))
                 && validate_factor(CHILD(tree, pos + 1)));