Skip to content

Commit efe23ac

Browse files
committed
all: Remove third argument to MP_REGISTER_MODULE.
It's no longer needed because this macro is now processed after preprocessing the source code via cpp (in the qstr extraction stage), which means unused MP_REGISTER_MODULE's are filtered out by the preprocessor. Signed-off-by: Damien George <[email protected]>
1 parent 47f6343 commit efe23ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+173
-134
lines changed

docs/develop/cmodules.rst

+7-5

docs/develop/library.rst

+1-1

docs/develop/porting.rst

+1-6

examples/usercmodule/cexample/examplemodule.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,4 @@ const mp_obj_module_t example_user_cmodule = {
3131
};
3232

3333
// Register the module to make it available in Python.
34-
// Note: the "1" in the third argument means this module is always enabled.
35-
// This "1" can be optionally replaced with a macro like MODULE_CEXAMPLE_ENABLED
36-
// which can then be used to conditionally enable this module.
37-
MP_REGISTER_MODULE(MP_QSTR_cexample, example_user_cmodule, 1);
34+
MP_REGISTER_MODULE(MP_QSTR_cexample, example_user_cmodule);

examples/usercmodule/cppexample/examplemodule.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,4 @@ const mp_obj_module_t cppexample_user_cmodule = {
2222
};
2323

2424
// Register the module to make it available in Python.
25-
// Note: the "1" in the third argument means this module is always enabled.
26-
// This "1" can be optionally replaced with a macro like MODULE_CPPEXAMPLE_ENABLED
27-
// which can then be used to conditionally enable this module.
28-
MP_REGISTER_MODULE(MP_QSTR_cppexample, cppexample_user_cmodule, 1);
25+
MP_REGISTER_MODULE(MP_QSTR_cppexample, cppexample_user_cmodule);

extmod/modbluetooth.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ const mp_obj_module_t mp_module_ubluetooth = {
10041004
.globals = (mp_obj_dict_t *)&mp_module_bluetooth_globals,
10051005
};
10061006

1007-
MP_REGISTER_MODULE(MP_QSTR_ubluetooth, mp_module_ubluetooth, MICROPY_PY_BLUETOOTH);
1007+
MP_REGISTER_MODULE(MP_QSTR_ubluetooth, mp_module_ubluetooth);
10081008

10091009
// Helpers
10101010

extmod/modbtree.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ const mp_obj_module_t mp_module_btree = {
380380
.globals = (mp_obj_dict_t *)&mp_module_btree_globals,
381381
};
382382

383-
MP_REGISTER_MODULE(MP_QSTR_btree, mp_module_btree, MICROPY_PY_BTREE);
383+
MP_REGISTER_MODULE(MP_QSTR_btree, mp_module_btree);
384384
#endif
385385

386386
#endif // MICROPY_PY_BTREE

extmod/modframebuf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ const mp_obj_module_t mp_module_framebuf = {
668668
.globals = (mp_obj_dict_t *)&framebuf_module_globals,
669669
};
670670

671-
MP_REGISTER_MODULE(MP_QSTR_framebuf, mp_module_framebuf, MICROPY_PY_FRAMEBUF);
671+
MP_REGISTER_MODULE(MP_QSTR_framebuf, mp_module_framebuf);
672672
#endif
673673

674674
#endif // MICROPY_PY_FRAMEBUF

extmod/modlwip.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1778,9 +1778,9 @@ const mp_obj_module_t mp_module_lwip = {
17781778
.globals = (mp_obj_dict_t *)&mp_module_lwip_globals,
17791779
};
17801780

1781-
MP_REGISTER_MODULE(MP_QSTR_lwip, mp_module_lwip, MICROPY_PY_LWIP);
1781+
MP_REGISTER_MODULE(MP_QSTR_lwip, mp_module_lwip);
17821782

17831783
// On LWIP-ports, this is the usocket module (replaces extmod/modusocket.c).
1784-
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_lwip, MICROPY_PY_LWIP);
1784+
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_lwip);
17851785

17861786
#endif // MICROPY_PY_LWIP

extmod/modnetwork.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const mp_obj_module_t mp_module_network = {
102102
.globals = (mp_obj_dict_t *)&mp_module_network_globals,
103103
};
104104

105-
MP_REGISTER_MODULE(MP_QSTR_network, mp_module_network, MICROPY_PY_NETWORK);
105+
MP_REGISTER_MODULE(MP_QSTR_network, mp_module_network);
106106

107107
/*******************************************************************************/
108108
// Implementations of network methods that can be used by any interface

extmod/modonewire.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,6 @@ const mp_obj_module_t mp_module_onewire = {
163163
.globals = (mp_obj_dict_t *)&onewire_module_globals,
164164
};
165165

166-
MP_REGISTER_MODULE(MP_QSTR__onewire, mp_module_onewire, MICROPY_PY_ONEWIRE);
166+
MP_REGISTER_MODULE(MP_QSTR__onewire, mp_module_onewire);
167167

168168
#endif // MICROPY_PY_ONEWIRE

extmod/moduasyncio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,6 @@ const mp_obj_module_t mp_module_uasyncio = {
310310
.globals = (mp_obj_dict_t *)&mp_module_uasyncio_globals,
311311
};
312312

313-
MP_REGISTER_MODULE(MP_QSTR__uasyncio, mp_module_uasyncio, MICROPY_PY_UASYNCIO);
313+
MP_REGISTER_MODULE(MP_QSTR__uasyncio, mp_module_uasyncio);
314314

315315
#endif // MICROPY_PY_UASYNCIO

extmod/modubinascii.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,6 @@ const mp_obj_module_t mp_module_ubinascii = {
258258
.globals = (mp_obj_dict_t *)&mp_module_binascii_globals,
259259
};
260260

261-
MP_REGISTER_MODULE(MP_QSTR_ubinascii, mp_module_ubinascii, MICROPY_PY_UBINASCII);
261+
MP_REGISTER_MODULE(MP_QSTR_ubinascii, mp_module_ubinascii);
262262

263263
#endif // MICROPY_PY_UBINASCII

extmod/moducryptolib.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,6 @@ const mp_obj_module_t mp_module_ucryptolib = {
374374
.globals = (mp_obj_dict_t *)&mp_module_ucryptolib_globals,
375375
};
376376

377-
MP_REGISTER_MODULE(MP_QSTR_ucryptolib, mp_module_ucryptolib, MICROPY_PY_UCRYPTOLIB);
377+
MP_REGISTER_MODULE(MP_QSTR_ucryptolib, mp_module_ucryptolib);
378378

379379
#endif // MICROPY_PY_UCRYPTOLIB

extmod/moductypes.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,6 @@ const mp_obj_module_t mp_module_uctypes = {
717717
.globals = (mp_obj_dict_t *)&mp_module_uctypes_globals,
718718
};
719719

720-
MP_REGISTER_MODULE(MP_QSTR_uctypes, mp_module_uctypes, MICROPY_PY_UCTYPES);
720+
MP_REGISTER_MODULE(MP_QSTR_uctypes, mp_module_uctypes);
721721

722722
#endif

extmod/moduhashlib.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,6 @@ const mp_obj_module_t mp_module_uhashlib = {
371371
.globals = (mp_obj_dict_t *)&mp_module_uhashlib_globals,
372372
};
373373

374-
MP_REGISTER_MODULE(MP_QSTR_uhashlib, mp_module_uhashlib, MICROPY_PY_UHASHLIB);
374+
MP_REGISTER_MODULE(MP_QSTR_uhashlib, mp_module_uhashlib);
375375

376376
#endif // MICROPY_PY_UHASHLIB

extmod/moduheapq.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const mp_obj_module_t mp_module_uheapq = {
118118
.globals = (mp_obj_dict_t *)&mp_module_uheapq_globals,
119119
};
120120

121-
MP_REGISTER_MODULE(MP_QSTR_uheapq, mp_module_uheapq, MICROPY_PY_UHEAPQ);
121+
MP_REGISTER_MODULE(MP_QSTR_uheapq, mp_module_uheapq);
122122
#endif
123123

124124
#endif // MICROPY_PY_UHEAPQ

extmod/modujson.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,6 @@ const mp_obj_module_t mp_module_ujson = {
381381
.globals = (mp_obj_dict_t *)&mp_module_ujson_globals,
382382
};
383383

384-
MP_REGISTER_MODULE(MP_QSTR_ujson, mp_module_ujson, MICROPY_PY_UJSON);
384+
MP_REGISTER_MODULE(MP_QSTR_ujson, mp_module_ujson);
385385

386386
#endif // MICROPY_PY_UJSON

extmod/moduos.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,6 @@ const mp_obj_module_t mp_module_uos = {
176176
.globals = (mp_obj_dict_t *)&os_module_globals,
177177
};
178178

179-
MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos, MICROPY_PY_UOS);
179+
MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos);
180180

181181
#endif // MICROPY_PY_UOS

extmod/moduplatform.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ const mp_obj_module_t mp_module_uplatform = {
7575
.globals = (mp_obj_dict_t *)&modplatform_globals,
7676
};
7777

78-
MP_REGISTER_MODULE(MP_QSTR_uplatform, mp_module_uplatform, MICROPY_PY_UPLATFORM);
78+
MP_REGISTER_MODULE(MP_QSTR_uplatform, mp_module_uplatform);
7979

8080
#endif // MICROPY_PY_UPLATFORM

extmod/modurandom.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ const mp_obj_module_t mp_module_urandom = {
255255
.globals = (mp_obj_dict_t *)&mp_module_urandom_globals,
256256
};
257257

258-
MP_REGISTER_MODULE(MP_QSTR_urandom, mp_module_urandom, MICROPY_PY_URANDOM);
258+
MP_REGISTER_MODULE(MP_QSTR_urandom, mp_module_urandom);
259259
#endif
260260

261261
#endif // MICROPY_PY_URANDOM

extmod/modure.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ const mp_obj_module_t mp_module_ure = {
448448
.globals = (mp_obj_dict_t *)&mp_module_re_globals,
449449
};
450450

451-
MP_REGISTER_MODULE(MP_QSTR_ure, mp_module_ure, MICROPY_PY_URE);
451+
MP_REGISTER_MODULE(MP_QSTR_ure, mp_module_ure);
452452
#endif
453453

454454
// Source files #include'd here to make sure they're compiled in

extmod/moduselect.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,6 @@ const mp_obj_module_t mp_module_uselect = {
373373
.globals = (mp_obj_dict_t *)&mp_module_select_globals,
374374
};
375375

376-
MP_REGISTER_MODULE(MP_QSTR_uselect, mp_module_uselect, MICROPY_PY_USELECT);
376+
MP_REGISTER_MODULE(MP_QSTR_uselect, mp_module_uselect);
377377

378378
#endif // MICROPY_PY_USELECT

extmod/modusocket.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,6 @@ const mp_obj_module_t mp_module_usocket = {
637637
.globals = (mp_obj_dict_t *)&mp_module_usocket_globals,
638638
};
639639

640-
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket, MICROPY_PY_NETWORK && MICROPY_PY_USOCKET && !MICROPY_PY_LWIP);
640+
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket);
641641

642642
#endif // MICROPY_PY_NETWORK && MICROPY_PY_USOCKET && !MICROPY_PY_LWIP

extmod/modussl_axtls.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,6 @@ const mp_obj_module_t mp_module_ussl = {
358358
.globals = (mp_obj_dict_t *)&mp_module_ssl_globals,
359359
};
360360

361-
MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl, MICROPY_PY_USSL && MICROPY_SSL_AXTLS);
361+
MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl);
362362

363363
#endif // MICROPY_PY_USSL && MICROPY_SSL_AXTLS

extmod/modussl_mbedtls.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,6 @@ const mp_obj_module_t mp_module_ussl = {
418418
.globals = (mp_obj_dict_t *)&mp_module_ssl_globals,
419419
};
420420

421-
MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl, MICROPY_PY_USSL && MICROPY_SSL_MBEDTLS);
421+
MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl);
422422

423423
#endif // MICROPY_PY_USSL && MICROPY_SSL_MBEDTLS

extmod/modutimeq.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -229,5 +229,6 @@ const mp_obj_module_t mp_module_utimeq = {
229229
.globals = (mp_obj_dict_t *)&mp_module_utimeq_globals,
230230
};
231231

232-
MP_REGISTER_MODULE(MP_QSTR_utimeq, mp_module_utimeq, MICROPY_PY_UTIMEQ);
232+
MP_REGISTER_MODULE(MP_QSTR_utimeq, mp_module_utimeq);
233+
233234
#endif // MICROPY_PY_UTIMEQ

extmod/moduwebsocket.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,6 @@ const mp_obj_module_t mp_module_uwebsocket = {
310310
.globals = (mp_obj_dict_t *)&uwebsocket_module_globals,
311311
};
312312

313-
MP_REGISTER_MODULE(MP_QSTR_uwebsocket, mp_module_uwebsocket, MICROPY_PY_UWEBSOCKET);
313+
MP_REGISTER_MODULE(MP_QSTR_uwebsocket, mp_module_uwebsocket);
314314

315315
#endif // MICROPY_PY_UWEBSOCKET

extmod/moduzlib.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ const mp_obj_module_t mp_module_uzlib = {
223223
};
224224

225225

226-
MP_REGISTER_MODULE(MP_QSTR_uzlib, mp_module_uzlib, MICROPY_PY_UZLIB);
226+
MP_REGISTER_MODULE(MP_QSTR_uzlib, mp_module_uzlib);
227227
#endif
228228

229229
// Source files #include'd here to make sure they're compiled in

extmod/modwebrepl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,6 @@ const mp_obj_module_t mp_module_webrepl = {
363363
.globals = (mp_obj_dict_t *)&webrepl_module_globals,
364364
};
365365

366-
MP_REGISTER_MODULE(MP_QSTR__webrepl, mp_module_webrepl, MICROPY_PY_WEBREPL);
366+
MP_REGISTER_MODULE(MP_QSTR__webrepl, mp_module_webrepl);
367367

368368
#endif // MICROPY_PY_WEBREPL

ports/cc3200/mods/modmachine.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,4 @@ const mp_obj_module_t mp_module_machine = {
214214
.globals = (mp_obj_dict_t*)&machine_module_globals,
215215
};
216216

217-
MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine, MICROPY_PY_MACHINE);
217+
MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine);

ports/cc3200/mods/modnetwork.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const mp_obj_module_t mp_module_network = {
159159
.globals = (mp_obj_dict_t*)&mp_module_network_globals,
160160
};
161161

162-
MP_REGISTER_MODULE(MP_QSTR_network, mp_module_network, 1);
162+
MP_REGISTER_MODULE(MP_QSTR_network, mp_module_network);
163163

164164
#if (MICROPY_PORT_HAS_TELNET || MICROPY_PORT_HAS_FTP)
165165
STATIC const mp_rom_map_elem_t network_server_locals_dict_table[] = {

ports/cc3200/mods/moduos.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,4 @@ const mp_obj_module_t mp_module_uos = {
180180
.globals = (mp_obj_dict_t*)&os_module_globals,
181181
};
182182

183-
MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos, 1);
183+
MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos);

ports/cc3200/mods/modusocket.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -817,4 +817,4 @@ const mp_obj_module_t mp_module_usocket = {
817817
.globals = (mp_obj_dict_t*)&mp_module_usocket_globals,
818818
};
819819

820-
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket, 1);
820+
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket);

ports/cc3200/mods/modussl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,4 @@ const mp_obj_module_t mp_module_ussl = {
161161
.globals = (mp_obj_dict_t*)&mp_module_ussl_globals,
162162
};
163163

164-
MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl, 1);
164+
MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl);

ports/cc3200/mods/modutime.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,4 @@ const mp_obj_module_t mp_module_utime = {
156156
.globals = (mp_obj_dict_t*)&time_module_globals,
157157
};
158158

159-
MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime, 1);
159+
MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime);

ports/cc3200/mods/modwipy.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ const mp_obj_module_t wipy_module = {
2929
.globals = (mp_obj_dict_t*)&wipy_module_globals,
3030
};
3131

32-
MP_REGISTER_MODULE(MP_QSTR_wipy, wipy_module, 1);
32+
MP_REGISTER_MODULE(MP_QSTR_wipy, wipy_module);

ports/esp32/modesp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,4 @@ const mp_obj_module_t esp_module = {
143143
.globals = (mp_obj_dict_t *)&esp_module_globals,
144144
};
145145

146-
MP_REGISTER_MODULE(MP_QSTR_esp, esp_module, 1);
146+
MP_REGISTER_MODULE(MP_QSTR_esp, esp_module);

ports/esp32/modesp32.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,4 +225,4 @@ const mp_obj_module_t esp32_module = {
225225
.globals = (mp_obj_dict_t *)&esp32_module_globals,
226226
};
227227

228-
MP_REGISTER_MODULE(MP_QSTR_esp32, esp32_module, 1);
228+
MP_REGISTER_MODULE(MP_QSTR_esp32, esp32_module);

ports/esp32/modmachine.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,6 @@ const mp_obj_module_t mp_module_machine = {
337337
.globals = (mp_obj_dict_t *)&machine_module_globals,
338338
};
339339

340-
MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine, MICROPY_PY_MACHINE);
340+
MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine);
341341

342342
#endif // MICROPY_PY_MACHINE

ports/esp32/modnetwork.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,4 +298,4 @@ const mp_obj_module_t mp_module_network = {
298298

299299
// Note: This port doesn't define MICROPY_PY_NETWORK so this will not conflict
300300
// with the common implementation provided by extmod/modnetwork.c.
301-
MP_REGISTER_MODULE(MP_QSTR_network, mp_module_network, 1);
301+
MP_REGISTER_MODULE(MP_QSTR_network, mp_module_network);

ports/esp32/modsocket.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -871,4 +871,4 @@ const mp_obj_module_t mp_module_usocket = {
871871
// Note: This port doesn't define MICROPY_PY_USOCKET or MICROPY_PY_LWIP so
872872
// this will not conflict with the common implementation provided by
873873
// extmod/mod{lwip,usocket}.c.
874-
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket, 1);
874+
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket);

ports/esp32/modutime.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ const mp_obj_module_t utime_module = {
107107
.globals = (mp_obj_dict_t *)&time_module_globals,
108108
};
109109

110-
MP_REGISTER_MODULE(MP_QSTR_utime, utime_module, 1);
110+
MP_REGISTER_MODULE(MP_QSTR_utime, utime_module);

ports/esp8266/modesp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,4 +380,4 @@ const mp_obj_module_t esp_module = {
380380
.globals = (mp_obj_dict_t *)&esp_module_globals,
381381
};
382382

383-
MP_REGISTER_MODULE(MP_QSTR_esp, esp_module, 1);
383+
MP_REGISTER_MODULE(MP_QSTR_esp, esp_module);

ports/esp8266/modmachine.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,6 @@ const mp_obj_module_t mp_module_machine = {
453453
.globals = (mp_obj_dict_t *)&machine_module_globals,
454454
};
455455

456-
MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine, MICROPY_PY_MACHINE);
456+
MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine);
457457

458458
#endif // MICROPY_PY_MACHINE

ports/esp8266/modnetwork.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -548,4 +548,4 @@ const mp_obj_module_t network_module = {
548548

549549
// Note: This port doesn't define MICROPY_PY_NETWORK so this will not conflict
550550
// with the common implementation provided by extmod/modnetwork.c.
551-
MP_REGISTER_MODULE(MP_QSTR_network, network_module, 1);
551+
MP_REGISTER_MODULE(MP_QSTR_network, network_module);

ports/esp8266/modutime.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@ const mp_obj_module_t utime_module = {
130130
.globals = (mp_obj_dict_t *)&time_module_globals,
131131
};
132132

133-
MP_REGISTER_MODULE(MP_QSTR_utime, utime_module, 1);
133+
MP_REGISTER_MODULE(MP_QSTR_utime, utime_module);

ports/javascript/modutime.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ const mp_obj_module_t mp_module_utime = {
5555
.globals = (mp_obj_dict_t *)&time_module_globals,
5656
};
5757

58-
MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime, 1);
58+
MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime);

0 commit comments

Comments
 (0)