Skip to content

Commit

Permalink
extmod/modure: Redirect regex debug printing to mp_printf.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Dec 9, 2021
1 parent 71168ec commit efde4b2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions extmod/modure.c
Expand Up @@ -454,11 +454,16 @@ const mp_obj_module_t mp_module_ure = {
// only if module is enabled by config setting.

#define re1_5_fatal(x) assert(!x)

#include "lib/re1.5/compilecode.c"
#include "lib/re1.5/recursiveloop.c"
#include "lib/re1.5/charclass.c"

#if MICROPY_PY_URE_DEBUG
// Make sure the output print statements go to the same output as other Python output.
#define printf(...) mp_printf(&mp_plat_print, __VA_ARGS__)
#include "lib/re1.5/dumpcode.c"
#undef printf
#endif
#include "lib/re1.5/recursiveloop.c"
#include "lib/re1.5/charclass.c"

#endif // MICROPY_PY_URE

0 comments on commit efde4b2

Please sign in to comment.