Add new parser error code, E_OVERFLOW. This error is returned when
the number of children of a node exceeds the max possible value for
the short that is used to count them. The Python runtime converts
this parser error into the SyntaxError "expression too long."
diff --git a/Include/errcode.h b/Include/errcode.h
index 5655782..f94c11c 100644
--- a/Include/errcode.h
+++ b/Include/errcode.h
@@ -52,6 +52,7 @@
#define E_DONE 16 /* Parsing complete */
#define E_ERROR 17 /* Execution error */
#define E_INDENT 18 /* Invalid indentation detected */
+#define E_OVERFLOW 19 /* Node had too many children */
#ifdef __cplusplus
}
diff --git a/Include/node.h b/Include/node.h
index 7f30923..3a564f7 100644
--- a/Include/node.h
+++ b/Include/node.h
@@ -46,7 +46,7 @@
} node;
extern DL_IMPORT(node *) PyNode_New Py_PROTO((int type));
-extern DL_IMPORT(node *) PyNode_AddChild Py_PROTO((node *n, int type, char *str, int lineno));
+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));
/* Node access functions */