[Python-checkins] python/dist/src/Modules parsermodule.c,2.68,2.68.6.1

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Sun, 02 Feb 2003 11:34:21 -0800


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

Modified Files:
      Tag: release22-maint
	parsermodule.c 
Log Message:
backport:

revision 2.75
date: 2003/01/29 14:20:22;  author: mwh;  state: Exp;  lines: +2 -0
Teach the parsermodule about floor division.  Fixes

[ 676521 ] parser module validation failure



Index: parsermodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v
retrieving revision 2.68
retrieving revision 2.68.6.1
diff -C2 -d -r2.68 -r2.68.6.1
*** parsermodule.c	8 Dec 2001 18:02:57 -0000	2.68
--- parsermodule.c	2 Feb 2003 19:34:14 -0000	2.68.6.1
***************
*** 1439,1442 ****
--- 1439,1443 ----
                     || strcmp(s, "*=") == 0
                     || strcmp(s, "/=") == 0
+                    || strcmp(s, "//=") == 0
                     || strcmp(s, "%=") == 0
                     || strcmp(s, "&=") == 0
***************
*** 2094,2097 ****
--- 2095,2099 ----
          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)));