From 100012bec6e8103fcf4aa429dfe1bd801301d642 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Sat, 21 Mar 2020 17:11:30 -0500 Subject: [PATCH] windows: Remove custom definition of MP_PLAT_PRINT_STRN. This removes the port-specific definition of MP_PLAT_PRINT_STRN on the windows port, so that the default mp_hal_stdout_tx_strn_cooked() is always used. This fixes releasing the GIL during the call to write() (this was missed in bc3499f0103abcae39ad048bb42a518a665b8497). Also, mp_hal_dupterm_tx_strn() was defined but never used anywhere so it is safe to delete it. --- ports/windows/mpconfigport.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ports/windows/mpconfigport.h b/ports/windows/mpconfigport.h index 410945983d..2efcf6b155 100644 --- a/ports/windows/mpconfigport.h +++ b/ports/windows/mpconfigport.h @@ -171,15 +171,6 @@ typedef long long mp_off_t; typedef long mp_off_t; #endif -#if MICROPY_PY_OS_DUPTERM -#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len) -void mp_hal_dupterm_tx_strn(const char *str, size_t len); -#else -#include -#define MP_PLAT_PRINT_STRN(str, len) do { int ret = write(1, str, len); (void)ret; } while (0) -#define mp_hal_dupterm_tx_strn(s, l) -#endif - #define MICROPY_PORT_BUILTINS \ { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) },