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.
This commit is contained in:
parent
1ed3356540
commit
a559098fec
|
@ -26,6 +26,8 @@
|
||||||
#ifndef MICROPY_INCLUDED_PY_MPERRNO_H
|
#ifndef MICROPY_INCLUDED_PY_MPERRNO_H
|
||||||
#define MICROPY_INCLUDED_PY_MPERRNO_H
|
#define MICROPY_INCLUDED_PY_MPERRNO_H
|
||||||
|
|
||||||
|
#include "py/mpconfig.h"
|
||||||
|
|
||||||
#if MICROPY_USE_INTERNAL_ERRNO
|
#if MICROPY_USE_INTERNAL_ERRNO
|
||||||
|
|
||||||
// MP_Exxx errno's are defined directly as numeric values
|
// MP_Exxx errno's are defined directly as numeric values
|
||||||
|
@ -138,7 +140,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MICROPY_PY_UERRNO
|
#if MICROPY_PY_UERRNO
|
||||||
|
|
||||||
|
#include "py/obj.h"
|
||||||
|
|
||||||
qstr mp_errno_to_str(mp_obj_t errno_val);
|
qstr mp_errno_to_str(mp_obj_t errno_val);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // MICROPY_INCLUDED_PY_MPERRNO_H
|
#endif // MICROPY_INCLUDED_PY_MPERRNO_H
|
||||||
|
|
Loading…
Reference in New Issue