[Python-checkins] python/dist/src/Python newcompile.c, 1.1.2.91, 1.1.2.92

jhylton at users.sourceforge.net jhylton at users.sourceforge.net
Wed Apr 21 01:28:09 EDT 2004


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14966

Modified Files:
      Tag: ast-branch
	newcompile.c 
Log Message:
Check for an empty body and exit immediately.
This must guard the GET(..., 0) which blows up on an empty sequence.


Index: newcompile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/newcompile.c,v
retrieving revision 1.1.2.91
retrieving revision 1.1.2.92
diff -C2 -d -r1.1.2.91 -r1.1.2.92
*** newcompile.c	21 Apr 2004 04:29:27 -0000	1.1.2.91
--- newcompile.c	21 Apr 2004 05:28:06 -0000	1.1.2.92
***************
*** 1087,1090 ****
--- 1087,1092 ----
  	stmt_ty st;
  
+ 	if (!asdl_seq_LEN(stmts))
+ 		return 1;
  	st = asdl_seq_GET(stmts, 0);
  	if (compiler_isdocstring(st)) {




More information about the Python-checkins mailing list