Skip to content

Commit add1200

Browse files
jimmodpgeorge
authored andcommitted
all: Remove the zlib module.
This will be replaced with a new deflate module providing the same functionality, with an optional frozen Python wrapper providing a replacement zlib module. binascii.crc32 is temporarily disabled. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <[email protected]>
1 parent 9fb56d1 commit add1200

22 files changed

+4
-482
lines changed

examples/natmod/zlib/Makefile

Lines changed: 0 additions & 13 deletions
This file was deleted.

examples/natmod/zlib/zlib.c

Lines changed: 0 additions & 35 deletions
This file was deleted.

extmod/extmod.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ set(MICROPY_SOURCE_EXTMOD
3636
${MICROPY_EXTMOD_DIR}/modssl_mbedtls.c
3737
${MICROPY_EXTMOD_DIR}/modtime.c
3838
${MICROPY_EXTMOD_DIR}/modwebsocket.c
39-
${MICROPY_EXTMOD_DIR}/modzlib.c
4039
${MICROPY_EXTMOD_DIR}/modwebrepl.c
4140
${MICROPY_EXTMOD_DIR}/network_cyw43.c
4241
${MICROPY_EXTMOD_DIR}/network_lwip.c

extmod/extmod.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ SRC_EXTMOD_C += \
3535
extmod/moductypes.c \
3636
extmod/modwebrepl.c \
3737
extmod/modwebsocket.c \
38-
extmod/modzlib.c \
3938
extmod/network_cyw43.c \
4039
extmod/network_lwip.c \
4140
extmod/network_ninaw10.c \

extmod/modbinascii.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ STATIC mp_obj_t mod_binascii_b2a_base64(size_t n_args, const mp_obj_t *pos_args,
170170
}
171171
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mod_binascii_b2a_base64_obj, 1, mod_binascii_b2a_base64);
172172

173-
#if MICROPY_PY_BINASCII_CRC32
174-
#include "lib/uzlib/tinf.h"
173+
#if 0 // MICROPY_PY_BINASCII_CRC32
174+
#include "lib/uzlib/crc32.c"
175175

176176
STATIC mp_obj_t mod_binascii_crc32(size_t n_args, const mp_obj_t *args) {
177177
mp_buffer_info_t bufinfo;
@@ -191,7 +191,7 @@ STATIC const mp_rom_map_elem_t mp_module_binascii_globals_table[] = {
191191
#endif
192192
{ MP_ROM_QSTR(MP_QSTR_a2b_base64), MP_ROM_PTR(&mod_binascii_a2b_base64_obj) },
193193
{ MP_ROM_QSTR(MP_QSTR_b2a_base64), MP_ROM_PTR(&mod_binascii_b2a_base64_obj) },
194-
#if MICROPY_PY_BINASCII_CRC32
194+
#if 0 // MICROPY_PY_BINASCII_CRC32
195195
{ MP_ROM_QSTR(MP_QSTR_crc32), MP_ROM_PTR(&mod_binascii_crc32_obj) },
196196
#endif
197197
};

extmod/modzlib.c

Lines changed: 0 additions & 239 deletions
This file was deleted.

ports/cc3200/mpconfigport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
#define MICROPY_PY_THREAD_GIL (1)
111111
#define MICROPY_PY_BINASCII (1)
112112
#define MICROPY_PY_UCTYPES (0)
113-
#define MICROPY_PY_ZLIB (0)
114113
#define MICROPY_PY_JSON (1)
115114
#define MICROPY_PY_RE (1)
116115
#define MICROPY_PY_HEAPQ (0)

ports/qemu-arm/mpconfigport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
#define MICROPY_PY_BINASCII (1)
4141
#define MICROPY_PY_RANDOM (1)
4242
#define MICROPY_PY_UCTYPES (1)
43-
#define MICROPY_PY_ZLIB (1)
4443
#define MICROPY_PY_JSON (1)
4544
#define MICROPY_PY_OS (1)
4645
#define MICROPY_PY_RE (1)

ports/samd/mpconfigport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
#define MICROPY_PY_UCTYPES (1)
9292
#define MICROPY_PY_HEAPQ (1)
9393
#define MICROPY_PY_RANDOM (1)
94-
#define MICROPY_PY_ZLIB (1)
9594
#define MICROPY_PY_ASYNCIO (1)
9695
#define MICROPY_PY_MACHINE_RTC (1)
9796
#ifndef MICROPY_PY_MACHINE_ADC

ports/stm32/boards/NUCLEO_G474RE/mpconfigboard.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#define MICROPY_HW_HAS_FLASH (0) // QSPI extflash not mounted
1111

1212
#define MICROPY_PY_ASYNCIO (0)
13-
#define MICROPY_PY_ZLIB (0)
1413
#define MICROPY_PY_BINASCII (0)
1514
#define MICROPY_PY_HASHLIB (0)
1615
#define MICROPY_PY_JSON (0)

ports/windows/mpconfigport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
#define MICROPY_PY_TIME_INCLUDEFILE "ports/unix/modtime.c"
145145
#define MICROPY_PY_ERRNO (1)
146146
#define MICROPY_PY_UCTYPES (1)
147-
#define MICROPY_PY_ZLIB (1)
148147
#define MICROPY_PY_JSON (1)
149148
#define MICROPY_PY_RE (1)
150149
#define MICROPY_PY_HEAPQ (1)

ports/windows/msvc/sources.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<PyExtModSource Include="$(PyBaseDir)extmod\modre.c" />
1919
<PyExtModSource Include="$(PyBaseDir)extmod\modselect.c" />
2020
<PyExtModSource Include="$(PyBaseDir)extmod\modtime.c" />
21-
<PyExtModSource Include="$(PyBaseDir)extmod\modzlib.c" />
2221
<PyExtModSource Include="$(PyBaseDir)extmod\virtpin.c" />
2322
<PyExtModSource Include="$(PyBaseDir)extmod\vfs.c" />
2423
<PyExtModSource Include="$(PyBaseDir)extmod\vfs_posix.c" />

py/mpconfig.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,10 +1555,6 @@ typedef double mp_float_t;
15551555
#define MICROPY_PY_UCTYPES_NATIVE_C_TYPES (1)
15561556
#endif
15571557

1558-
#ifndef MICROPY_PY_ZLIB
1559-
#define MICROPY_PY_ZLIB (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EXTRA_FEATURES)
1560-
#endif
1561-
15621558
#ifndef MICROPY_PY_JSON
15631559
#define MICROPY_PY_JSON (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EXTRA_FEATURES)
15641560
#endif

0 commit comments

Comments
 (0)