[Python-checkins] python/dist/src/Python ast.c,1.1.2.12,1.1.2.13

jhylton@users.sourceforge.net jhylton@users.sourceforge.net
Mon, 24 Mar 2003 13:23:31 -0800


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

Modified Files:
      Tag: ast-branch
	ast.c 
Log Message:
Generate the appropriate BoolOp opcode.


Index: ast.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/ast.c,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.13
diff -C2 -d -r1.1.2.12 -r1.1.2.13
*** ast.c	21 Oct 2002 21:45:45 -0000	1.1.2.12
--- ast.c	24 Mar 2003 21:23:27 -0000	1.1.2.13
***************
*** 687,691 ****
  	    asdl_seq_SET(seq, i / 2, e);
  	}
! 	return BoolOp(Or, seq);
  	break;
      case not_test:
--- 687,696 ----
  	    asdl_seq_SET(seq, i / 2, e);
  	}
! 	if (strcmp(STR(CHILD(n, 1)), "and"))
! 	    return BoolOp(Or, seq);
! 	else {
! 	    assert(strcmp(STR(CHILD(n, 1)), "or"));
! 	    return BoolOp(And, seq);
! 	}
  	break;
      case not_test: