all: Use new mp_obj_new_str_from_cstr() function.
Use new function mp_obj_new_str_from_cstr() where appropriate. It simplifies the code, and makes it smaller too. Signed-off-by: Jon Foster <jon@jon-foster.co.uk>
This commit is contained in:
committed by
Damien George
parent
289b2dd879
commit
92484d8822
@@ -146,7 +146,7 @@ static void handle_op(mp_obj_webrepl_t *self) {
|
||||
// Handle operations requiring opened file
|
||||
|
||||
mp_obj_t open_args[2] = {
|
||||
mp_obj_new_str(self->hdr.fname, strlen(self->hdr.fname)),
|
||||
mp_obj_new_str_from_cstr(self->hdr.fname),
|
||||
MP_OBJ_NEW_QSTR(MP_QSTR_rb)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user