Files
micropython/py
Jon Foster 289b2dd879 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>
2024-07-04 15:52:47 +10:00
..
2024-06-21 16:21:33 +10:00
2024-06-21 16:21:33 +10:00
2024-06-06 17:34:28 +10:00
2024-06-06 17:34:28 +10:00
2023-06-02 21:50:57 +10:00
2024-06-06 17:34:28 +10:00
2024-06-21 16:21:27 +10:00