diff options
Diffstat (limited to 'Include/node.h')
-rw-r--r-- | Include/node.h | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/Include/node.h b/Include/node.h index 55fcd0f..affa8cd 100644 --- a/Include/node.h +++ b/Include/node.h @@ -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 } |