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 | 5 | ||||
-rw-r--r-- | py/py.mk | 3 | ||||
-rw-r--r-- | py/qstrdefs.h | 5 |
5 files changed, 16 insertions, 1 deletions
diff --git a/py/builtin.h b/py/builtin.h index 25edf32892..af428d0c04 100644 --- a/py/builtin.h +++ b/py/builtin.h @@ -89,3 +89,4 @@ extern struct _dummy_t mp_sys_stderr_obj; // extmod modules extern const mp_obj_module_t mp_module_uctypes; +extern const mp_obj_module_t mp_module_zlibd; diff --git a/py/builtintables.c b/py/builtintables.c index 0f0cfcbc72..e55e93b33a 100644 --- a/py/builtintables.c +++ b/py/builtintables.c @@ -196,6 +196,9 @@ STATIC const mp_map_elem_t mp_builtin_module_table[] = { #if MICROPY_PY_UCTYPES { MP_OBJ_NEW_QSTR(MP_QSTR_uctypes), (mp_obj_t)&mp_module_uctypes }, #endif +#if MICROPY_PY_ZLIBD + { MP_OBJ_NEW_QSTR(MP_QSTR_zlibd), (mp_obj_t)&mp_module_zlibd }, +#endif // extra builtin modules as defined by a port MICROPY_PORT_BUILTIN_MODULES diff --git a/py/mpconfig.h b/py/mpconfig.h index 351910b6dd..76e02be512 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -368,10 +368,15 @@ typedef double mp_float_t; // Extended modules + #ifndef MICROPY_PY_UCTYPES #define MICROPY_PY_UCTYPES (0) #endif +#ifndef MICROPY_PY_ZLIBD +#define MICROPY_PY_ZLIBD (0) +#endif + /*****************************************************************************/ /* Hooks for a port to add builtins */ @@ -104,7 +104,8 @@ PY_O_BASENAME = \ smallint.o \ pfenv.o \ pfenv_printf.o \ - ../extmod/moductypes.o + ../extmod/moductypes.o \ + ../extmod/modzlibd.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 062f741de6..e154faf559 100644 --- a/py/qstrdefs.h +++ b/py/qstrdefs.h @@ -450,3 +450,8 @@ Q(getter) Q(setter) Q(deleter) #endif + +#if MICROPY_PY_ZLIBD +Q(zlibd) +Q(decompress) +#endif |