py/builtinimport: Forward all debug printing to MICROPY_DEBUG_PRINTER.

This commit is contained in:
stijn 2021-09-21 12:00:01 +02:00 committed by Damien George
parent ea186de4c5
commit ea880d5674

View File

@ -248,7 +248,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
DEBUG_printf("__import__:\n"); DEBUG_printf("__import__:\n");
for (size_t i = 0; i < n_args; i++) { for (size_t i = 0; i < n_args; i++) {
DEBUG_printf(" "); DEBUG_printf(" ");
mp_obj_print(args[i], PRINT_REPR); mp_obj_print_helper(MICROPY_DEBUG_PRINTER, args[i], PRINT_REPR);
DEBUG_printf("\n"); DEBUG_printf("\n");
} }
#endif #endif
@ -292,7 +292,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
#if DEBUG_PRINT #if DEBUG_PRINT
DEBUG_printf("Current module/package: "); DEBUG_printf("Current module/package: ");
mp_obj_print(this_name_q, PRINT_REPR); mp_obj_print_helper(MICROPY_DEBUG_PRINTER, this_name_q, PRINT_REPR);
DEBUG_printf(", is_package: %d", is_pkg); DEBUG_printf(", is_package: %d", is_pkg);
DEBUG_printf("\n"); DEBUG_printf("\n");
#endif #endif