extmod/modlwip: Add dummy .makefile() method.
This commit is contained in:
parent
c7fb87caff
commit
f1919b7c98
|
@ -878,6 +878,12 @@ STATIC mp_obj_t lwip_socket_setsockopt(mp_uint_t n_args, const mp_obj_t *args) {
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(lwip_socket_setsockopt_obj, 4, 4, lwip_socket_setsockopt);
|
||||
|
||||
STATIC mp_obj_t lwip_socket_makefile(mp_uint_t n_args, const mp_obj_t *args) {
|
||||
(void)n_args;
|
||||
return args[0];
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(lwip_socket_makefile_obj, 1, 3, lwip_socket_makefile);
|
||||
|
||||
STATIC mp_uint_t lwip_socket_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *errcode) {
|
||||
lwip_socket_obj_t *socket = self_in;
|
||||
|
||||
|
@ -904,6 +910,7 @@ STATIC const mp_map_elem_t lwip_socket_locals_dict_table[] = {
|
|||
{ MP_OBJ_NEW_QSTR(MP_QSTR_recvfrom), (mp_obj_t)&lwip_socket_recvfrom_obj },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_settimeout), (mp_obj_t)&lwip_socket_settimeout_obj },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_setsockopt), (mp_obj_t)&lwip_socket_setsockopt_obj },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_makefile), (mp_obj_t)&lwip_socket_makefile_obj },
|
||||
};
|
||||
STATIC MP_DEFINE_CONST_DICT(lwip_socket_locals_dict, lwip_socket_locals_dict_table);
|
||||
|
||||
|
|
|
@ -706,6 +706,7 @@ Q(sendto)
|
|||
Q(recvfrom)
|
||||
Q(settimeout)
|
||||
Q(setsockopt)
|
||||
Q(makefile)
|
||||
#if MICROPY_PY_LWIP_SLIP
|
||||
// for lwip.slip
|
||||
Q(slip)
|
||||
|
|
Loading…
Reference in New Issue