diff options
| author | Damien George <damien.p.george@gmail.com> | 2016-10-07 13:31:59 +1100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2016-10-07 13:31:59 +1100 |
| commit | 3a0a7717304cc34a4d6ef55f767666c918c185b5 (patch) | |
| tree | 1fe4bf5605c62004fe24b6233c95ca02d870c37d /py/runtime.h | |
| parent | 0363e1d7b5b80046b49b07d8fbb739315474b4b9 (diff) | |
py: Add mp_raise_OSError(errno) helper function.
This is an often used code pattern, and its use reduces code size of the
core by about 100 bytes.
Diffstat (limited to 'py/runtime.h')
| -rw-r--r-- | py/runtime.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/runtime.h b/py/runtime.h index 29b38853f..80488098a 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -137,6 +137,7 @@ NORETURN void mp_raise_msg(const mp_obj_type_t *exc_type, const char *msg); //NORETURN void nlr_raise_msg_varg(const mp_obj_type_t *exc_type, const char *fmt, ...); NORETURN void mp_raise_ValueError(const char *msg); NORETURN void mp_raise_TypeError(const char *msg); +NORETURN void mp_raise_OSError(int errno_); NORETURN void mp_not_implemented(const char *msg); // Raise NotImplementedError with given message NORETURN void mp_exc_recursion_depth(void); |
