aboutsummaryrefslogtreecommitdiff
path: root/py/parse.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-10 14:27:31 +0000
committerDamien George <damien.p.george@gmail.com>2014-04-10 14:27:31 +0000
commit58ba4c3b4c12e9bf6b8731fd26e0c9cac527122f (patch)
treea0fce39198f5a192e780016ef3608813a351573a /py/parse.h
parentffa9bddfc4006aebb2689826f700ea167f4de54d (diff)
py: Check explicitly for memory allocation failure in parser.
Previously, a failed malloc/realloc would throw an exception, which was not caught. I think it's better to keep the parser free from NLR (exception throwing), hence this patch.
Diffstat (limited to 'py/parse.h')
-rw-r--r--py/parse.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/parse.h b/py/parse.h
index 135de47d1..29bcf36e7 100644
--- a/py/parse.h
+++ b/py/parse.h
@@ -67,6 +67,7 @@ typedef enum {
} mp_parse_input_kind_t;
typedef enum {
+ MP_PARSE_ERROR_MEMORY,
MP_PARSE_ERROR_UNEXPECTED_INDENT,
MP_PARSE_ERROR_UNMATCHED_UNINDENT,
MP_PARSE_ERROR_INVALID_SYNTAX,