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.
This commit is contained in:
Damien George
2017-02-22 12:53:42 +11:00
parent 22a6344ebe
commit f563406d2e
2 changed files with 20 additions and 0 deletions

View File

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