diff options
author | Damien George <damien.p.george@gmail.com> | 2017-07-24 18:41:24 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-07-24 18:41:24 +1000 |
commit | a559098fecd0a0e2aa98d2a8b3b6ba080b4e096f (patch) | |
tree | bed46116e33047086d6efc41c5a934dcc0a2a2f1 /py/mperrno.h | |
parent | 1ed3356540f55c9ed4167c87166f6d18b2868f9c (diff) | |
download | micropython-a559098fecd0a0e2aa98d2a8b3b6ba080b4e096f.tar.gz micropython-a559098fecd0a0e2aa98d2a8b3b6ba080b4e096f.zip |
py/mperrno: Allow mperrno.h to be correctly included before other hdrs.
Before this patch the mperrno.h file could be included and would silently
succeed with incorrect config settings, because mpconfig.h was not yet
included.
Diffstat (limited to 'py/mperrno.h')
-rw-r--r-- | py/mperrno.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/py/mperrno.h b/py/mperrno.h index c515ed4888..f439f65554 100644 --- a/py/mperrno.h +++ b/py/mperrno.h @@ -26,6 +26,8 @@ #ifndef MICROPY_INCLUDED_PY_MPERRNO_H #define MICROPY_INCLUDED_PY_MPERRNO_H +#include "py/mpconfig.h" + #if MICROPY_USE_INTERNAL_ERRNO // MP_Exxx errno's are defined directly as numeric values @@ -138,7 +140,11 @@ #endif #if MICROPY_PY_UERRNO + +#include "py/obj.h" + qstr mp_errno_to_str(mp_obj_t errno_val); + #endif #endif // MICROPY_INCLUDED_PY_MPERRNO_H |