unix/modsocket: Use mp_const_empty_map instead of creating empty map.

This commit is contained in:
Paul Sokolovsky 2016-04-04 23:43:16 +03:00
parent 069654f2be
commit 1b811b946e
1 changed files with 1 additions and 3 deletions

View File

@ -316,9 +316,7 @@ STATIC mp_obj_t socket_makefile(size_t n_args, const mp_obj_t *args) {
mp_obj_t *new_args = alloca(n_args * sizeof(mp_obj_t));
memcpy(new_args + 1, args + 1, (n_args - 1) * sizeof(mp_obj_t));
new_args[0] = MP_OBJ_NEW_SMALL_INT(self->fd);
mp_map_t kwargs;
mp_map_init(&kwargs, 0);
return mp_builtin_open(n_args, new_args, &kwargs);
return mp_builtin_open(n_args, new_args, (mp_map_t*)&mp_const_empty_map);
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_makefile_obj, 1, 3, socket_makefile);