diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-06-20 19:10:44 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-06-20 19:10:44 (GMT) |
commit | 94988067b96c6187fd940eaff99c2c5a68daac68 (patch) | |
tree | 681d7a64160eeab1ece2685bb234971d404ef0a6 /Include | |
parent | 56c807d318954222bb67167477d98eafb6b85d81 (diff) | |
download | cpython-94988067b96c6187fd940eaff99c2c5a68daac68.zip cpython-94988067b96c6187fd940eaff99c2c5a68daac68.tar.gz cpython-94988067b96c6187fd940eaff99c2c5a68daac68.tar.bz2 |
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."
Diffstat (limited to 'Include')
-rw-r--r-- | Include/errcode.h | 1 | ||||
-rw-r--r-- | Include/node.h | 2 |
2 files changed, 2 insertions, 1 deletions
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 @@ PERFORMANCE OF THIS SOFTWARE. #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 @@ typedef struct _node { } 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 */ |