Skip to content

Commit

Permalink
Add support for MicroPython 1.19 MP_REGISTER_MODULE
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Jun 16, 2022
1 parent 0d2acd8 commit db9477e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions micropython/qrcode.c
Expand Up @@ -137,4 +137,8 @@ const mp_obj_module_t qrcode_user_cmodule = {
.globals = (mp_obj_dict_t*)&mp_module_qrcode_globals,
};

#if MICROPY_VERSION <= 70144
MP_REGISTER_MODULE(MP_QSTR_qrcode, qrcode_user_cmodule, MODULE_QRCODE_ENABLED);
#else
MP_REGISTER_MODULE(MP_QSTR_qrcode, qrcode_user_cmodule);
#endif

0 comments on commit db9477e

Please sign in to comment.