[Python-checkins] CVS: python/dist/src/Python compile.c,2.210,2.211

Jeremy Hylton jhylton@users.sourceforge.net
Mon, 06 Aug 2001 13:34:27 -0700


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

Modified Files:
	compile.c 
Log Message:
Another bug fix for recent import * warning (caught by Thomas Wouters)

Only return if symtable_warn() returns -1, indicating that the warning
was turned into an error.


Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.210
retrieving revision 2.211
diff -C2 -d -r2.210 -r2.211
*** compile.c	2001/08/06 19:55:17	2.210
--- compile.c	2001/08/06 20:34:25	2.211
***************
*** 5296,5302 ****
  		if (TYPE(CHILD(n, 3)) == STAR) {
  			if (st->st_cur->ste_type != TYPE_MODULE) {
! 				symtable_warn(st,
! 				      "import * only allowed at module level");
! 				return;
  			}
  			st->st_cur->ste_optimized |= OPT_IMPORT_STAR;
--- 5296,5302 ----
  		if (TYPE(CHILD(n, 3)) == STAR) {
  			if (st->st_cur->ste_type != TYPE_MODULE) {
! 				if (symtable_warn(st,
! 				  "import * only allowed at module level") < 0)
! 					return;
  			}
  			st->st_cur->ste_optimized |= OPT_IMPORT_STAR;