[Python-checkins] CVS: python/dist/src/Python future.c,2.4,2.5

Fred L. Drake fdrake@usw-pr-cvs1.sourceforge.net
Fri, 09 Mar 2001 18:15:39 -0800


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

Modified Files:
	future.c 
Log Message:

When iterating over the names imported in a future statement, ignore the
commas in the concrete syntax; checking those causes a segfault.

This fixes SF bug #407394.


Index: future.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/future.c,v
retrieving revision 2.4
retrieving revision 2.5
diff -C2 -r2.4 -r2.5
*** future.c	2001/02/28 17:47:12	2.4
--- future.c	2001/03/10 02:15:37	2.5
***************
*** 20,24 ****
  	REQ(n, import_stmt); /* must by from __future__ import ... */
  
! 	for (i = 3; i < NCH(n); ++i) {
  		ch = CHILD(n, i);
  		if (TYPE(ch) == STAR) {
--- 20,24 ----
  	REQ(n, import_stmt); /* must by from __future__ import ... */
  
! 	for (i = 3; i < NCH(n); i += 2) {
  		ch = CHILD(n, i);
  		if (TYPE(ch) == STAR) {