diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-10 14:27:31 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-10 14:27:31 +0000 |
commit | 58ba4c3b4c12e9bf6b8731fd26e0c9cac527122f (patch) | |
tree | a0fce39198f5a192e780016ef3608813a351573a /py/parse.h | |
parent | ffa9bddfc4006aebb2689826f700ea167f4de54d (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.h | 1 |
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, |