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 <damien@micropython.org>
This commit is contained in:
Damien George
2022-05-31 22:56:11 +10:00
parent 47f634300c
commit efe23aca71
103 changed files with 173 additions and 134 deletions

View File

@@ -157,4 +157,4 @@ const mp_obj_module_t microbit_module = {
.globals = (mp_obj_dict_t*)&microbit_module_globals,
};
MP_REGISTER_MODULE(MP_QSTR_microbit, microbit_module, 1);
MP_REGISTER_MODULE(MP_QSTR_microbit, microbit_module);

View File

@@ -102,6 +102,6 @@ const mp_obj_module_t ble_module = {
.globals = (mp_obj_dict_t*)&ble_module_globals,
};
MP_REGISTER_MODULE(MP_QSTR_ble, ble_module, MICROPY_PY_BLE);
MP_REGISTER_MODULE(MP_QSTR_ble, ble_module);
#endif // MICROPY_PY_BLE

View File

@@ -54,4 +54,4 @@ const mp_obj_module_t board_module = {
.globals = (mp_obj_dict_t*)&board_module_globals,
};
MP_REGISTER_MODULE(MP_QSTR_board, board_module, 1);
MP_REGISTER_MODULE(MP_QSTR_board, board_module);

View File

@@ -55,6 +55,8 @@
#include "rtcounter.h"
#endif
#if MICROPY_PY_MACHINE
#define PYB_RESET_HARD (0)
#define PYB_RESET_WDT (1)
#define PYB_RESET_SOFT (2)
@@ -249,4 +251,6 @@ const mp_obj_module_t mp_module_machine = {
.globals = (mp_obj_dict_t*)&machine_module_globals,
};
MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine, MICROPY_PY_MACHINE);
MP_REGISTER_MODULE(MP_QSTR_umachine, mp_module_machine);
#endif // MICROPY_PY_MACHINE

View File

@@ -509,6 +509,6 @@ const mp_obj_module_t music_module = {
.globals = (mp_obj_dict_t*)&microbit_music_locals_dict,
};
MP_REGISTER_MODULE(MP_QSTR_music, music_module, MICROPY_PY_MUSIC);
MP_REGISTER_MODULE(MP_QSTR_music, music_module);
#endif // MICROPY_PY_MUSIC

View File

@@ -95,6 +95,6 @@ const mp_obj_module_t nrf_module = {
.globals = (mp_obj_dict_t *)&nrf_module_globals,
};
MP_REGISTER_MODULE(MP_QSTR_nrf, nrf_module, MICROPY_PY_NRF);
MP_REGISTER_MODULE(MP_QSTR_nrf, nrf_module);
#endif // MICROPY_PY_NRF

View File

@@ -67,6 +67,6 @@ const mp_obj_module_t mp_module_ubluepy = {
.globals = (mp_obj_dict_t*)&mp_module_ubluepy_globals,
};
MP_REGISTER_MODULE(MP_QSTR_ubluepy, mp_module_ubluepy, MICROPY_PY_UBLUEPY);
MP_REGISTER_MODULE(MP_QSTR_ubluepy, mp_module_ubluepy);
#endif // MICROPY_PY_UBLUEPY

View File

@@ -197,4 +197,4 @@ const mp_obj_module_t mp_module_uos = {
.globals = (mp_obj_dict_t*)&os_module_globals,
};
MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos, 1);
MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos);

View File

@@ -55,4 +55,4 @@ const mp_obj_module_t mp_module_utime = {
.globals = (mp_obj_dict_t*)&time_module_globals,
};
MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime, 1);
MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime);