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.
This commit is contained in:
parent
b1066a9f96
commit
100012bec6
@ -171,15 +171,6 @@ typedef long long mp_off_t;
|
|||||||
typedef long mp_off_t;
|
typedef long mp_off_t;
|
||||||
#endif
|
#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 <unistd.h>
|
|
||||||
#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 \
|
#define MICROPY_PORT_BUILTINS \
|
||||||
{ MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) },
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user