Skip to content

Commit

Permalink
Drop third argument from MP_REGISTER_MODULE. (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Jun 16, 2022
1 parent d438344 commit 00139bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/ulab.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,10 @@ const mp_obj_module_t ulab_user_cmodule = {
.globals = (mp_obj_dict_t*)&mp_module_ulab_globals,
};

// Use old three-argument MP_REGISTER_MODULE for
// MicroPython <= v1.18.0: (1 << 16) | (18 << 8) | 0
#if MICROPY_VERSION <= 70144
MP_REGISTER_MODULE(MP_QSTR_ulab, ulab_user_cmodule, MODULE_ULAB_ENABLED);
#else
MP_REGISTER_MODULE(MP_QSTR_ulab, ulab_user_cmodule);
#endif

0 comments on commit 00139bd

Please sign in to comment.