summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-02-22 12:53:42 +1100
committerDamien George <damien.p.george@gmail.com>2017-02-22 12:58:11 +1100
commitf563406d2e342be1535592f80680c510f9aade9a (patch)
treec9157ff8964d41a501e0dd151cf41de5c571db43 /py/mpconfig.h
parent22a6344ebe032e9e66024614ecbe7d9608fa9288 (diff)
py/moduerrno: Make uerrno.errorcode dict configurable.
It's configured by MICROPY_PY_UERRNO_ERRORCODE and enabled by default (since that's the behaviour before this patch). Without this dict the lookup of errno codes to strings must use the uerrno module itself.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 1b47d822f..7e3bd8bdb 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -917,6 +917,11 @@ typedef double mp_float_t;
#define MICROPY_PY_UERRNO (0)
#endif
+// Whether to provide the uerrno.errorcode dict
+#ifndef MICROPY_PY_UERRNO_ERRORCODE
+#define MICROPY_PY_UERRNO_ERRORCODE (1)
+#endif
+
// Whether to provide "uselect" module (baremetal implementation)
#ifndef MICROPY_PY_USELECT
#define MICROPY_PY_USELECT (0)