From: Neal Norwitz Date: Sun, 2 Feb 2003 19:34:14 +0000 (+0000) Subject: backport: X-Git-Tag: v2.2.3c1~155 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=887ed5e2a97c98de83559eaf0a7210f103f3af8d;p=thirdparty%2FPython%2Fcpython.git 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 --- diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index ca0531d6b0f6..20db86e1fe2a 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -1438,6 +1438,7 @@ validate_expr_stmt(node *tree) || strcmp(s, "-=") == 0 || strcmp(s, "*=") == 0 || strcmp(s, "/=") == 0 + || strcmp(s, "//=") == 0 || strcmp(s, "%=") == 0 || strcmp(s, "&=") == 0 || strcmp(s, "|=") == 0 @@ -2093,6 +2094,7 @@ validate_term(node *tree) for ( ; res && (pos < nch); pos += 2) 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)));