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.
This commit is contained in:
Damien George
2016-10-07 13:31:59 +11:00
parent 0363e1d7b5
commit 3a0a771730
5 changed files with 16 additions and 11 deletions

View File

@@ -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);