[Python-checkins] CVS: python/dist/src/Python compile.c,2.165,2.166
Jeremy Hylton
jhylton@users.sourceforge.net
Mon, 19 Feb 2001 07:33:13 -0800
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv2552/Python
Modified Files:
compile.c
Log Message:
Tolerate ill-formed trees in symtable_assign(). Fixes SF bug 132510.
Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.165
retrieving revision 2.166
diff -C2 -r2.165 -r2.166
*** compile.c 2001/02/18 04:45:10 2.165
--- compile.c 2001/02/19 15:33:10 2.166
***************
*** 4811,4820 ****
if (NCH(n) == 0)
return;
! if (NCH(n) != 1) {
! DUMP(n);
! Py_FatalError("too many children in default case\n");
}
! n = CHILD(n, 0);
! goto loop;
}
}
--- 4811,4823 ----
if (NCH(n) == 0)
return;
! if (NCH(n) == 1) {
! n = CHILD(n, 0);
! goto loop;
}
! /* Should only occur for errors like x + 1 = 1,
! which will be caught in the next pass. */
! for (i = 0; i < NCH(n); ++i)
! if (TYPE(CHILD(n, i)) >= single_input)
! symtable_assign(st, CHILD(n, i), flag);
}
}