extmod/modlwip: Print timeout with correct format string.
As timeout is of type `mp_uint_t`, it must be printed with UINT_FMT. Before, the compiler plugin produced an error in the PYBD_SF6 build, which is a nanboxing build with 64-bit ints. Signed-off-by: Jeff Epler <jepler@gmail.com>
This commit is contained in:
committed by
Damien George
parent
18a835e9b4
commit
2d93909ebe
@@ -907,7 +907,7 @@ static const mp_obj_type_t lwip_socket_type;
|
||||
|
||||
static void lwip_socket_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
|
||||
lwip_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
mp_printf(print, "<socket state=%d timeout=%d incoming=", self->state, self->timeout);
|
||||
mp_printf(print, "<socket state=%d timeout=" UINT_FMT " incoming=", self->state, self->timeout);
|
||||
if (self->type == MOD_NETWORK_SOCK_STREAM) {
|
||||
mp_printf(print, "%p off=%d>", self->incoming.tcp.pbuf, self->recv_offset);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user