Mailing List Archive

python/nondist/sandbox/ast asdl.h,1.4,1.5 astmodule.c,1.5,1.6
Update of /cvsroot/python/python/nondist/sandbox/ast
In directory usw-pr-cvs1:/tmp/cvs-serv14158

Modified Files:
asdl.h astmodule.c
Log Message:
Get build working again, also fix warning
Protect header file from multiple inclusion
Should we protect from c++?
Add XXX question about why we are using #define rather than typedef


Index: asdl.h
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/ast/asdl.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** asdl.h 16 Apr 2002 23:38:58 -0000 1.4
--- asdl.h 21 Apr 2002 14:45:41 -0000 1.5
***************
*** 1,4 ****
--- 1,9 ----
+ #ifndef Py_ASDL_H
+ #define Py_ASDL_H
+
+ /* XXX why are these #def'd rather than typedef'd? */
#define identifier PyObject *
#define string PyObject *
+ #define object PyObject *

#include <stdbool.h>
***************
*** 22,23 ****
--- 27,30 ----

#define asdl_seq_LEN(S) ((S)->used)
+
+ #endif /* !Py_ASDL_H */

Index: astmodule.c
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/ast/astmodule.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** astmodule.c 19 Apr 2002 22:15:12 -0000 1.5
--- astmodule.c 21 Apr 2002 14:45:41 -0000 1.6
***************
*** 656,661 ****
['else' ':' suite]
*/
- REQ(n, if_stmt);
char *s;

if (NCH(n) == 4)
--- 656,661 ----
['else' ':' suite]
*/
char *s;
+ REQ(n, if_stmt);

if (NCH(n) == 4)
***************
*** 889,893 ****
return NULL;

! fprintf(stderr, "module %X, stmts = %d\n", m, m->v.Module.body->used);

Py_INCREF(Py_None);
--- 889,894 ----
return NULL;

! fprintf(stderr, "module %X, stmts = %d\n",
! (unsigned)m, m->v.Module.body->used);

Py_INCREF(Py_None);