summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/vfs.c
diff options
context:
space:
mode:
authorJon Foster <jon@jon-foster.co.uk>2024-04-01 19:19:29 +0100
committerDamien George <damien@micropython.org>2024-07-04 15:52:47 +1000
commit289b2dd87960a4cdf019013cecd489f0d0cabc26 (patch)
tree647081dc2a33d0444c3b2f95f3d65ed3d531b99e /extmod/vfs.c
parentf36a5654a87838e68fb313272098777f76a94865 (diff)
downloadmicropython-289b2dd87960a4cdf019013cecd489f0d0cabc26.tar.gz
micropython-289b2dd87960a4cdf019013cecd489f0d0cabc26.zip
py/objstr: Add new mp_obj_new_str_from_cstr() helper function.
There were lots of places where this pattern was duplicated, to convert a standard C string to a MicroPython string: x = mp_obj_new_str(s, strlen(s)); This commit provides a simpler method that removes this code duplication: x = mp_obj_new_str_from_cstr(s); This gives clearer, and probably smaller, code. Signed-off-by: Jon Foster <jon@jon-foster.co.uk>
Diffstat (limited to 'extmod/vfs.c')
0 files changed, 0 insertions, 0 deletions