Commit 31bbcd44 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

zephyr/modusocket: Add dummy makefile() implementation.

parent 868453d3
...@@ -450,6 +450,12 @@ STATIC mp_obj_t socket_recv(mp_obj_t self_in, mp_obj_t len_in) { ...@@ -450,6 +450,12 @@ STATIC mp_obj_t socket_recv(mp_obj_t self_in, mp_obj_t len_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_recv_obj, socket_recv); STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_recv_obj, socket_recv);
STATIC mp_obj_t socket_makefile(size_t n_args, const mp_obj_t *args) {
(void)n_args;
return args[0];
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_makefile_obj, 1, 3, socket_makefile);
STATIC mp_obj_t socket_close(mp_obj_t self_in) { STATIC mp_obj_t socket_close(mp_obj_t self_in) {
socket_obj_t *socket = self_in; socket_obj_t *socket = self_in;
if (socket->ctx != NULL) { if (socket->ctx != NULL) {
...@@ -474,6 +480,7 @@ STATIC const mp_map_elem_t socket_locals_dict_table[] = { ...@@ -474,6 +480,7 @@ STATIC const mp_map_elem_t socket_locals_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_readinto), (mp_obj_t)&mp_stream_readinto_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_readinto), (mp_obj_t)&mp_stream_readinto_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_readline), (mp_obj_t)&mp_stream_unbuffered_readline_obj}, { MP_OBJ_NEW_QSTR(MP_QSTR_readline), (mp_obj_t)&mp_stream_unbuffered_readline_obj},
{ MP_OBJ_NEW_QSTR(MP_QSTR_write), (mp_obj_t)&mp_stream_write_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_write), (mp_obj_t)&mp_stream_write_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_makefile), (mp_obj_t)&socket_makefile_obj },
}; };
STATIC MP_DEFINE_CONST_DICT(socket_locals_dict, socket_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(socket_locals_dict, socket_locals_dict_table);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment