summaryrefslogtreecommitdiffstats
path: root/Include/node.h
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-07-08 23:37:28 (GMT)
committerFred Drake <fdrake@acm.org>2000-07-08 23:37:28 (GMT)
commit5eb6d4e3bf094c33ae66432eeae3668e220dd28d (patch)
tree2a69e01bee2bbf196f8432b639cc8985431ec7e4 /Include/node.h
parentff7df9d7b8b6ad7e73fe54cdf02b9ab6386ff355 (diff)
downloadcpython-5eb6d4e3bf094c33ae66432eeae3668e220dd28d.zip
cpython-5eb6d4e3bf094c33ae66432eeae3668e220dd28d.tar.gz
cpython-5eb6d4e3bf094c33ae66432eeae3668e220dd28d.tar.bz2
ANSI-fication and Py_PROTO extermination.
Diffstat (limited to 'Include/node.h')
-rw-r--r--Include/node.h37
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
}