diff options
Diffstat (limited to 'py/objexcept.c')
-rw-r--r-- | py/objexcept.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/py/objexcept.c b/py/objexcept.c index 0efc21d360..11651025f0 100644 --- a/py/objexcept.c +++ b/py/objexcept.c @@ -17,6 +17,9 @@ typedef struct _mp_obj_exception_t { mp_obj_tuple_t args; } mp_obj_exception_t; +// Instance of MemoryError exception - needed by mp_malloc_fail +const mp_obj_exception_t mp_const_MemoryError_obj = {{&mp_type_MemoryError}, MP_OBJ_NULL, {{&mp_type_tuple}, 0}}; + // Instance of GeneratorExit exception - needed by generator.close() // This would belong to objgenerator.c, but to keep mp_obj_exception_t // definition module-private so far, have it here. |