Skip to content

Commit 3416287

Browse files
committed
moduzlib: Integrate into the system.
1 parent 426bb58 commit 3416287

File tree

7 files changed

+16
-2
lines changed

7 files changed

+16
-2
lines changed

py/builtin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,6 @@ extern struct _dummy_t mp_sys_stderr_obj;
8989
// extmod modules
9090
extern const mp_obj_module_t mp_module_uctypes;
9191
extern const mp_obj_module_t mp_module_zlibd;
92+
extern const mp_obj_module_t mp_module_uzlib;
9293
extern const mp_obj_module_t mp_module_ujson;
9394
extern const mp_obj_module_t mp_module_ure;

py/builtintables.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ STATIC const mp_map_elem_t mp_builtin_module_table[] = {
206206
#if MICROPY_PY_ZLIBD
207207
{ MP_OBJ_NEW_QSTR(MP_QSTR_zlibd), (mp_obj_t)&mp_module_zlibd },
208208
#endif
209+
#if MICROPY_PY_UZLIB
210+
{ MP_OBJ_NEW_QSTR(MP_QSTR_uzlib), (mp_obj_t)&mp_module_uzlib },
211+
#endif
209212
#if MICROPY_PY_UJSON
210213
{ MP_OBJ_NEW_QSTR(MP_QSTR_ujson), (mp_obj_t)&mp_module_ujson },
211214
#endif

py/mpconfig.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,10 @@ typedef double mp_float_t;
390390
#define MICROPY_PY_ZLIBD (0)
391391
#endif
392392

393+
#ifndef MICROPY_PY_UZLIB
394+
#define MICROPY_PY_UZLIB (0)
395+
#endif
396+
393397
#ifndef MICROPY_PY_UJSON
394398
#define MICROPY_PY_UJSON (0)
395399
#endif

py/py.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ PY_O_BASENAME = \
114114
../extmod/modzlibd.o \
115115
../extmod/modujson.o \
116116
../extmod/modure.o \
117+
../extmod/moduzlib.o \
117118

118119
# prepend the build destination prefix to the py object files
119120
PY_O = $(addprefix $(PY_BUILD)/, $(PY_O_BASENAME))

py/qstrdefs.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,11 @@ Q(zlibd)
468468
Q(decompress)
469469
#endif
470470

471+
#if MICROPY_PY_UZLIB
472+
Q(uzlib)
473+
Q(decompress)
474+
#endif
475+
471476
#if MICROPY_PY_UJSON
472477
Q(ujson)
473478
Q(dumps)

tests/extmod/zlibd_decompress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
try:
22
import zlib
33
except ImportError:
4-
import zlibd as zlib
4+
import uzlib as zlib
55

66
PATTERNS = [
77
# Packed results produced by CPy's zlib.compress()

unix/mpconfigport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#define MICROPY_PY_GC_COLLECT_RETVAL (1)
5656

5757
#define MICROPY_PY_UCTYPES (1)
58-
#define MICROPY_PY_ZLIBD (1)
58+
#define MICROPY_PY_UZLIB (1)
5959
#define MICROPY_PY_UJSON (1)
6060
#define MICROPY_PY_URE (1)
6161

0 commit comments

Comments
 (0)