ANSI-fication and Py_PROTO extermination.

This commit is contained in:
Fred Drake 2000-07-08 23:37:28 +00:00
parent ff7df9d7b8
commit 5eb6d4e3bf
12 changed files with 175 additions and 173 deletions

View file

@ -1,9 +1,3 @@
#ifndef Py_NODE_H
#define Py_NODE_H
#ifdef __cplusplus
extern "C" {
#endif
/***********************************************************
Copyright (c) 2000, BeOpen.com.
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
@ -16,17 +10,24 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
/* Parse tree node interface */
#ifndef Py_NODE_H
#define Py_NODE_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _node {
short n_type;
char *n_str;
short n_lineno;
short n_nchildren;
struct _node *n_child;
short n_type;
char *n_str;
short n_lineno;
short n_nchildren;
struct _node *n_child;
} node;
extern DL_IMPORT(node *) PyNode_New Py_PROTO((int type));
extern DL_IMPORT(int) PyNode_AddChild Py_PROTO((node *n, int type, char *str, int lineno));
extern DL_IMPORT(void) PyNode_Free Py_PROTO((node *n));
extern DL_IMPORT(node *) PyNode_New(int type);
extern DL_IMPORT(int) PyNode_AddChild(node *n, int type,
char *str, int lineno);
extern DL_IMPORT(void) PyNode_Free(node *n);
/* Node access functions */
#define NCH(n) ((n)->n_nchildren)
@ -40,13 +41,13 @@ extern DL_IMPORT(void) PyNode_Free Py_PROTO((node *n));
#else
#define REQ(n, type) \
{ if (TYPE(n) != (type)) { \
fprintf(stderr, "FATAL: node type %d, required %d\n", \
TYPE(n), type); \
abort(); \
fprintf(stderr, "FATAL: node type %d, required %d\n", \
TYPE(n), type); \
abort(); \
} }
#endif
extern DL_IMPORT(void) PyNode_ListTree Py_PROTO((node *));
extern DL_IMPORT(void) PyNode_ListTree(node *);
#ifdef __cplusplus
}