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.
pull/1/head
Damien George 2017-07-24 18:41:24 +10:00
parent 1ed3356540
commit a559098fec
1 changed files with 6 additions and 0 deletions

View File

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