diff options
Diffstat (limited to 'py')
-rw-r--r-- | py/builtin.h | 1 | ||||
-rw-r--r-- | py/builtintables.c | 3 | ||||
-rw-r--r-- | py/mpconfig.h | 4 | ||||
-rw-r--r-- | py/py.mk | 1 | ||||
-rw-r--r-- | py/qstrdefs.h | 5 |
5 files changed, 14 insertions, 0 deletions
diff --git a/py/builtin.h b/py/builtin.h index a6736152c5..a63752c5fa 100644 --- a/py/builtin.h +++ b/py/builtin.h @@ -95,3 +95,4 @@ extern const mp_obj_module_t mp_module_ujson; extern const mp_obj_module_t mp_module_ure; extern const mp_obj_module_t mp_module_uheapq; extern const mp_obj_module_t mp_module_uhashlib; +extern const mp_obj_module_t mp_module_ubinascii; diff --git a/py/builtintables.c b/py/builtintables.c index 1777838e0b..ebf8ddf4a7 100644 --- a/py/builtintables.c +++ b/py/builtintables.c @@ -224,6 +224,9 @@ STATIC const mp_map_elem_t mp_builtin_module_table[] = { #if MICROPY_PY_UHASHLIB { MP_OBJ_NEW_QSTR(MP_QSTR_uhashlib), (mp_obj_t)&mp_module_uhashlib }, #endif +#if MICROPY_PY_UBINASCII + { MP_OBJ_NEW_QSTR(MP_QSTR_ubinascii), (mp_obj_t)&mp_module_ubinascii }, +#endif // extra builtin modules as defined by a port MICROPY_PORT_BUILTIN_MODULES diff --git a/py/mpconfig.h b/py/mpconfig.h index f4f9986e4d..4bd7bfeab7 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -439,6 +439,10 @@ typedef double mp_float_t; #define MICROPY_PY_UHASHLIB (0) #endif +#ifndef MICROPY_PY_UBINASCII +#define MICROPY_PY_UBINASCII (0) +#endif + /*****************************************************************************/ /* Hooks for a port to add builtins */ @@ -117,6 +117,7 @@ PY_O_BASENAME = \ ../extmod/moduzlib.o \ ../extmod/moduheapq.o \ ../extmod/moduhashlib.o \ + ../extmod/modubinascii.o \ # prepend the build destination prefix to the py object files PY_O = $(addprefix $(PY_BUILD)/, $(PY_O_BASENAME)) diff --git a/py/qstrdefs.h b/py/qstrdefs.h index ccf6a8c28b..177d56e54c 100644 --- a/py/qstrdefs.h +++ b/py/qstrdefs.h @@ -518,3 +518,8 @@ Q(digest) Q(hexdigest) Q(sha256) #endif + +#if MICROPY_PY_UBINASCII +Q(ubinascii) +Q(hexlify) +#endif |