[Python-checkins] python/dist/src/Python Python-ast.c,1.1.2.3,1.1.2.4

jhylton@users.sourceforge.net jhylton@users.sourceforge.net
Tue, 03 Sep 2002 16:18:55 -0700


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

Modified Files:
      Tag: ast-branch
	Python-ast.c 
Log Message:
Update generated code for new Interactive definition.


Index: Python-ast.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/Python-ast.c,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** Python-ast.c	30 Aug 2002 19:20:40 -0000	1.1.2.3
--- Python-ast.c	3 Sep 2002 23:18:53 -0000	1.1.2.4
***************
*** 19,30 ****
  
  mod_ty
! Interactive(stmt_ty body)
  {
          mod_ty p;
-         if (!body) {
-                 PyErr_SetString(PyExc_ValueError,
-                                 "field body is required for Interactive");
-                 return NULL;
-         }
          p = (mod_ty)malloc(sizeof(*p));
          if (!p) {
--- 19,25 ----
  
  mod_ty
! Interactive(asdl_seq * body)
  {
          mod_ty p;
          p = (mod_ty)malloc(sizeof(*p));
          if (!p) {
***************
*** 1061,1065 ****
          case Interactive_kind:
                  marshal_write_int(buf, off, 2);
!                 marshal_write_stmt(buf, off, o->v.Interactive.body);
                  break;
          case Expression_kind:
--- 1056,1065 ----
          case Interactive_kind:
                  marshal_write_int(buf, off, 2);
!                 marshal_write_int(buf, off,
!                                   asdl_seq_LEN(o->v.Interactive.body));
!                 for (i = 0; i < asdl_seq_LEN(o->v.Interactive.body); i++) {
!                         void *elt = asdl_seq_GET(o->v.Interactive.body, i);
!                         marshal_write_stmt(buf, off, elt);
!                 }
                  break;
          case Expression_kind: