Skip to content

Commit a559098

Browse files
committed
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.
1 parent 1ed3356 commit a559098

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

py/mperrno.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#ifndef MICROPY_INCLUDED_PY_MPERRNO_H
2727
#define MICROPY_INCLUDED_PY_MPERRNO_H
2828

29+
#include "py/mpconfig.h"
30+
2931
#if MICROPY_USE_INTERNAL_ERRNO
3032

3133
// MP_Exxx errno's are defined directly as numeric values
@@ -138,7 +140,11 @@
138140
#endif
139141

140142
#if MICROPY_PY_UERRNO
143+
144+
#include "py/obj.h"
145+
141146
qstr mp_errno_to_str(mp_obj_t errno_val);
147+
142148
#endif
143149

144150
#endif // MICROPY_INCLUDED_PY_MPERRNO_H

0 commit comments

Comments
 (0)