summaryrefslogtreecommitdiff
path: root/extmod/modwebrepl.c
diff options
context:
space:
mode:
authorJon Foster <jon@jon-foster.co.uk>2024-04-01 19:23:49 +0100
committerDamien George <damien@micropython.org>2024-07-04 15:55:03 +1000
commit92484d8822635c125a7648d5b056ff7f78d62ab3 (patch)
tree34f8731d56f4330fe0e8a0ca325cdedd8e2eaa8a /extmod/modwebrepl.c
parent289b2dd87960a4cdf019013cecd489f0d0cabc26 (diff)
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>
Diffstat (limited to 'extmod/modwebrepl.c')
-rw-r--r--extmod/modwebrepl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modwebrepl.c b/extmod/modwebrepl.c
index 9d09f65a3..bac223d95 100644
--- a/extmod/modwebrepl.c
+++ b/extmod/modwebrepl.c
@@ -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)
};