File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -460,12 +460,26 @@ extern const struct _mp_obj_module_t ustack_module;
460
460
#define USTACK_MODULE
461
461
#endif
462
462
463
+ // These modules are not yet in shared-bindings, but we prefer the non-uxxx names.
464
+ #if MICROPY_PY_UERRNO
465
+ #define ERRNO_MODULE
466
+ { MP_ROM_QSTR (MP_QSTR_errno ), MP_ROM_PTR (& mp_module_uerrno ) },
467
+ #else
468
+ #define ERRNO_MODULE
469
+ #endif
470
+
463
471
#if MICROPY_PY_UJSON
464
472
#define JSON_MODULE { MP_ROM_QSTR(MP_QSTR_json), MP_ROM_PTR(&mp_module_ujson) },
465
473
#else
466
474
#define JSON_MODULE
467
475
#endif
468
476
477
+ #if MICROPY_PY_URE
478
+ #define RE_MODULE { MP_ROM_QSTR(MP_QSTR_re), MP_ROM_PTR(&mp_module_ure) },
479
+ #else
480
+ #define RE_MODULE
481
+ #endif
482
+
469
483
// Define certain native modules with weak links so they can be replaced with Python
470
484
// implementations. This list may grow over time.
471
485
#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
@@ -495,6 +509,7 @@ extern const struct _mp_obj_module_t ustack_module;
495
509
DIGITALIO_MODULE \
496
510
TERMINALIO_MODULE \
497
511
DISPLAYIO_MODULE \
512
+ ERRNO_MODULE \
498
513
GAMEPAD_MODULE \
499
514
I2CSLAVE_MODULE \
500
515
JSON_MODULE \
@@ -507,6 +522,7 @@ extern const struct _mp_obj_module_t ustack_module;
507
522
PIXELBUF_MODULE \
508
523
PULSEIO_MODULE \
509
524
RANDOM_MODULE \
525
+ RE_MODULE \
510
526
RTC_MODULE \
511
527
SAMD_MODULE \
512
528
STAGE_MODULE \
Original file line number Diff line number Diff line change @@ -179,7 +179,6 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
179
179
// extmod modules
180
180
181
181
#if MICROPY_PY_UERRNO
182
- { MP_ROM_QSTR (MP_QSTR_errno ), MP_ROM_PTR (& mp_module_uerrno ) },
183
182
{ MP_ROM_QSTR (MP_QSTR_uerrno ), MP_ROM_PTR (& mp_module_uerrno ) },
184
183
#endif
185
184
#if MICROPY_PY_UCTYPES
@@ -189,11 +188,9 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
189
188
{ MP_ROM_QSTR (MP_QSTR_uzlib ), MP_ROM_PTR (& mp_module_uzlib ) },
190
189
#endif
191
190
#if MICROPY_PY_UJSON
192
- { MP_ROM_QSTR (MP_QSTR_json ), MP_ROM_PTR (& mp_module_ujson ) },
193
191
{ MP_ROM_QSTR (MP_QSTR_ujson ), MP_ROM_PTR (& mp_module_ujson ) },
194
192
#endif
195
193
#if MICROPY_PY_URE
196
- { MP_ROM_QSTR (MP_QSTR_re ), MP_ROM_PTR (& mp_module_ure ) },
197
194
{ MP_ROM_QSTR (MP_QSTR_ure ), MP_ROM_PTR (& mp_module_ure ) },
198
195
#endif
199
196
#if MICROPY_PY_UHEAPQ
You can’t perform that action at this time.
0 commit comments