diff options
author | Jon Foster <jon@jon-foster.co.uk> | 2024-04-01 19:23:49 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-07-04 15:55:03 +1000 |
commit | 92484d8822635c125a7648d5b056ff7f78d62ab3 (patch) | |
tree | 34f8731d56f4330fe0e8a0ca325cdedd8e2eaa8a /extmod/vfs.c | |
parent | 289b2dd87960a4cdf019013cecd489f0d0cabc26 (diff) | |
download | micropython-92484d8822635c125a7648d5b056ff7f78d62ab3.tar.gz micropython-92484d8822635c125a7648d5b056ff7f78d62ab3.zip |
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/vfs.c')
-rw-r--r-- | extmod/vfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/vfs.c b/extmod/vfs.c index ae09b8afe8..5d564459c0 100644 --- a/extmod/vfs.c +++ b/extmod/vfs.c @@ -139,7 +139,7 @@ mp_import_stat_t mp_vfs_import_stat(const char *path) { } // delegate to vfs.stat() method - mp_obj_t path_o = mp_obj_new_str(path_out, strlen(path_out)); + mp_obj_t path_o = mp_obj_new_str_from_cstr(path_out); mp_obj_t stat; nlr_buf_t nlr; if (nlr_push(&nlr) == 0) { |