summaryrefslogtreecommitdiff
path: root/py/objstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/objstr.c b/py/objstr.c
index c7e4ebf53..346a6259f 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -2308,6 +2308,10 @@ mp_obj_t mp_obj_new_str(const char *data, size_t len) {
}
}
+mp_obj_t mp_obj_new_str_from_cstr(const char *str) {
+ return mp_obj_new_str(str, strlen(str));
+}
+
mp_obj_t mp_obj_str_intern(mp_obj_t str) {
GET_STR_DATA_LEN(str, data, len);
return mp_obj_new_str_via_qstr((const char *)data, len);