aboutsummaryrefslogtreecommitdiff
path: root/py/mperrno.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-07-24 18:41:24 +1000
committerDamien George <damien.p.george@gmail.com>2017-07-24 18:41:24 +1000
commita559098fecd0a0e2aa98d2a8b3b6ba080b4e096f (patch)
treebed46116e33047086d6efc41c5a934dcc0a2a2f1 /py/mperrno.h
parent1ed3356540f55c9ed4167c87166f6d18b2868f9c (diff)
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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/mperrno.h b/py/mperrno.h
index c515ed488..f439f6555 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