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 526157fbcd..5a68609aee 100644 --- a/py/builtin.h +++ b/py/builtin.h @@ -89,5 +89,6 @@ 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; +extern const mp_obj_module_t mp_module_uzlib; extern const mp_obj_module_t mp_module_ujson; extern const mp_obj_module_t mp_module_ure; diff --git a/py/builtintables.c b/py/builtintables.c index 1fd60d8177..5a7a303f9b 100644 --- a/py/builtintables.c +++ b/py/builtintables.c @@ -206,6 +206,9 @@ STATIC const mp_map_elem_t mp_builtin_module_table[] = { #if MICROPY_PY_ZLIBD { MP_OBJ_NEW_QSTR(MP_QSTR_zlibd), (mp_obj_t)&mp_module_zlibd }, #endif +#if MICROPY_PY_UZLIB + { MP_OBJ_NEW_QSTR(MP_QSTR_uzlib), (mp_obj_t)&mp_module_uzlib }, +#endif #if MICROPY_PY_UJSON { MP_OBJ_NEW_QSTR(MP_QSTR_ujson), (mp_obj_t)&mp_module_ujson }, #endif diff --git a/py/mpconfig.h b/py/mpconfig.h index 92b61d0e12..fa5f682cf1 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -390,6 +390,10 @@ typedef double mp_float_t; #define MICROPY_PY_ZLIBD (0) #endif +#ifndef MICROPY_PY_UZLIB +#define MICROPY_PY_UZLIB (0) +#endif + #ifndef MICROPY_PY_UJSON #define MICROPY_PY_UJSON (0) #endif @@ -114,6 +114,7 @@ PY_O_BASENAME = \ ../extmod/modzlibd.o \ ../extmod/modujson.o \ ../extmod/modure.o \ + ../extmod/moduzlib.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 eb99e1b3d7..a67cd92b83 100644 --- a/py/qstrdefs.h +++ b/py/qstrdefs.h @@ -468,6 +468,11 @@ Q(zlibd) Q(decompress) #endif +#if MICROPY_PY_UZLIB +Q(uzlib) +Q(decompress) +#endif + #if MICROPY_PY_UJSON Q(ujson) Q(dumps) |