Mailing List Archive

python/dist/src/Python ast.c,1.1.2.8,1.1.2.9
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv6799

Modified Files:
Tag: ast-branch
ast.c
Log Message:
Fix List handling.

Use seq_for_testlist() to compute the sequence elements, rather than
ast_for_testlist(). The latter returns a tuple, when we want a
sequence.


Index: ast.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/ast.c,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -C2 -d -r1.1.2.8 -r1.1.2.9
*** ast.c 1 Oct 2002 18:31:05 -0000 1.1.2.8
--- ast.c 1 Oct 2002 18:33:47 -0000 1.1.2.9
***************
*** 570,577 ****
REQ(ch, listmaker);
if (NCH(ch) == 1 || TYPE(CHILD(ch, 1)) == COMMA) {
! asdl_seq *elts = asdl_seq_new(1);
! if (!elts)
! return NULL;
! asdl_seq_SET(elts, 0, ast_for_testlist(ch));
return List(elts, Load);
}
--- 570,574 ----
REQ(ch, listmaker);
if (NCH(ch) == 1 || TYPE(CHILD(ch, 1)) == COMMA) {
! asdl_seq *elts = seq_for_testlist(ch);
return List(elts, Load);
}