py/objstr: Remove "make_qstr_if_not_already" arg from mp_obj_new_str.

This patch simplifies the str creation API to favour the common case of
creating a str object that is not forced to be interned.  To force
interning of a new str the new mp_obj_new_str_via_qstr function is added,
and should only be used if warranted.

Apart from simplifying the mp_obj_new_str function (and making it have the
same signature as mp_obj_new_bytes), this patch also reduces code size by a
bit (-16 bytes for bare-arm and roughly -40 bytes on the bare-metal archs).
diff --git a/extmod/modujson.c b/extmod/modujson.c
index f14682d..6eeba4e 100644
--- a/extmod/modujson.c
+++ b/extmod/modujson.c
@@ -166,7 +166,7 @@
                     goto fail;
                 }
                 S_NEXT(s);
-                next = mp_obj_new_str(vstr.buf, vstr.len, false);
+                next = mp_obj_new_str(vstr.buf, vstr.len);
                 break;
             case '-':
             case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': {
diff --git a/extmod/modwebrepl.c b/extmod/modwebrepl.c
index 3aba5c0..42b30f5 100644
--- a/extmod/modwebrepl.c
+++ b/extmod/modwebrepl.c
@@ -141,7 +141,7 @@
     // Handle operations requiring opened file
 
     mp_obj_t open_args[2] = {
-        mp_obj_new_str(self->hdr.fname, strlen(self->hdr.fname), false),
+        mp_obj_new_str(self->hdr.fname, strlen(self->hdr.fname)),
         MP_OBJ_NEW_QSTR(MP_QSTR_rb)
     };
 
diff --git a/extmod/vfs_fat.c b/extmod/vfs_fat.c
index 22346bd..9942dde 100644
--- a/extmod/vfs_fat.c
+++ b/extmod/vfs_fat.c
@@ -197,7 +197,7 @@
     if (res != FR_OK) {
         mp_raise_OSError(fresult_to_errno_table[res]);
     }
-    return mp_obj_new_str(buf, strlen(buf), false);
+    return mp_obj_new_str(buf, strlen(buf));
 }
 STATIC MP_DEFINE_CONST_FUN_OBJ_1(fat_vfs_getcwd_obj, fat_vfs_getcwd);
 
diff --git a/extmod/vfs_fat_misc.c b/extmod/vfs_fat_misc.c
index 9a26b4a..1f90ac1 100644
--- a/extmod/vfs_fat_misc.c
+++ b/extmod/vfs_fat_misc.c
@@ -57,7 +57,7 @@
         // make 3-tuple with info about this entry
         mp_obj_tuple_t *t = MP_OBJ_TO_PTR(mp_obj_new_tuple(3, NULL));
         if (self->is_str) {
-            t->items[0] = mp_obj_new_str(fn, strlen(fn), false);
+            t->items[0] = mp_obj_new_str(fn, strlen(fn));
         } else {
             t->items[0] = mp_obj_new_bytes((const byte*)fn, strlen(fn));
         }
diff --git a/extmod/vfs_reader.c b/extmod/vfs_reader.c
index 891098a..e1ee45a 100644
--- a/extmod/vfs_reader.c
+++ b/extmod/vfs_reader.c
@@ -71,7 +71,7 @@
 
 void mp_reader_new_file(mp_reader_t *reader, const char *filename) {
     mp_reader_vfs_t *rf = m_new_obj(mp_reader_vfs_t);
-    mp_obj_t arg = mp_obj_new_str(filename, strlen(filename), false);
+    mp_obj_t arg = mp_obj_new_str(filename, strlen(filename));
     rf->file = mp_vfs_open(1, &arg, (mp_map_t*)&mp_const_empty_map);
     int errcode;
     rf->len = mp_stream_rw(rf->file, rf->buf, sizeof(rf->buf), &errcode, MP_STREAM_RW_READ | MP_STREAM_RW_ONCE);
diff --git a/lib/netutils/netutils.c b/lib/netutils/netutils.c
index 06c3ff9..073f46b 100644
--- a/lib/netutils/netutils.c
+++ b/lib/netutils/netutils.c
@@ -41,7 +41,7 @@
     } else {
         ip_len = snprintf(ip_str, 16, "%u.%u.%u.%u", ip[0], ip[1], ip[2], ip[3]);
     }
-    return mp_obj_new_str(ip_str, ip_len, false);
+    return mp_obj_new_str(ip_str, ip_len);
 }
 
 // Takes an array with a raw IP address, and a port, and returns a net-address
diff --git a/ports/cc3200/mods/modwlan.c b/ports/cc3200/mods/modwlan.c
index f9c7111..8acc89d 100644
--- a/ports/cc3200/mods/modwlan.c
+++ b/ports/cc3200/mods/modwlan.c
@@ -885,7 +885,7 @@
         }
 
         mp_obj_t tuple[5];
-        tuple[0] = mp_obj_new_str((const char *)wlanEntry.ssid, wlanEntry.ssid_len, false);
+        tuple[0] = mp_obj_new_str((const char *)wlanEntry.ssid, wlanEntry.ssid_len);
         tuple[1] = mp_obj_new_bytes((const byte *)wlanEntry.bssid, SL_BSSID_LENGTH);
         // 'normalize' the security type
         if (wlanEntry.sec_type > 2) {
@@ -1075,7 +1075,7 @@
 STATIC mp_obj_t wlan_ssid(size_t n_args, const mp_obj_t *args) {
     wlan_obj_t *self = args[0];
     if (n_args == 1) {
-        return mp_obj_new_str((const char *)self->ssid, strlen((const char *)self->ssid), false);
+        return mp_obj_new_str((const char *)self->ssid, strlen((const char *)self->ssid));
     } else {
         size_t len;
         const char *ssid = mp_obj_str_get_data(args[1], &len);
@@ -1095,7 +1095,7 @@
         } else {
             mp_obj_t security[2];
             security[0] = mp_obj_new_int(self->auth);
-            security[1] = mp_obj_new_str((const char *)self->key, strlen((const char *)self->key), false);
+            security[1] = mp_obj_new_str((const char *)self->key, strlen((const char *)self->key));
             return mp_obj_new_tuple(2, security);
         }
     } else {
@@ -1199,7 +1199,7 @@
 //    mp_obj_t connections = mp_obj_new_list(0, NULL);
 //
 //    if (wlan_is_connected()) {
-//        device[0] = mp_obj_new_str((const char *)wlan_obj.ssid_o, strlen((const char *)wlan_obj.ssid_o), false);
+//        device[0] = mp_obj_new_str((const char *)wlan_obj.ssid_o, strlen((const char *)wlan_obj.ssid_o));
 //        device[1] = mp_obj_new_bytes((const byte *)wlan_obj.bssid, SL_BSSID_LENGTH);
 //        // add the device to the list
 //        mp_obj_list_append(connections, mp_obj_new_tuple(MP_ARRAY_SIZE(device), device));
@@ -1232,7 +1232,7 @@
 //        if (sl_NetAppGet(SL_NET_APP_DEVICE_CONFIG_ID, NETAPP_SET_GET_DEV_CONF_OPT_DEVICE_URN, &len, (uint8_t *)urn) < 0) {
 //            mp_raise_OSError(MP_EIO);
 //        }
-//        return mp_obj_new_str(urn, (len - 1), false);
+//        return mp_obj_new_str(urn, (len - 1));
 //    }
 //
 //    return mp_const_none;
diff --git a/ports/esp8266/modnetwork.c b/ports/esp8266/modnetwork.c
index b41a11f..4066c96 100644
--- a/ports/esp8266/modnetwork.c
+++ b/ports/esp8266/modnetwork.c
@@ -411,7 +411,7 @@
         }
         case QS(MP_QSTR_essid):
             req_if = SOFTAP_IF;
-            val = mp_obj_new_str((char*)cfg.ap.ssid, cfg.ap.ssid_len, false);
+            val = mp_obj_new_str((char*)cfg.ap.ssid, cfg.ap.ssid_len);
             break;
         case QS(MP_QSTR_hidden):
             req_if = SOFTAP_IF;
@@ -428,7 +428,7 @@
         case QS(MP_QSTR_dhcp_hostname): {
             req_if = STATION_IF;
             char* s = wifi_station_get_hostname();
-            val = mp_obj_new_str(s, strlen(s), false);
+            val = mp_obj_new_str(s, strlen(s));
             break;
         }
         default:
diff --git a/ports/esp8266/moduos.c b/ports/esp8266/moduos.c
index d055409..93f7aa7 100644
--- a/ports/esp8266/moduos.c
+++ b/ports/esp8266/moduos.c
@@ -60,7 +60,7 @@
 STATIC mp_obj_t os_uname(void) {
     // We must populate the "release" field each time in case it was GC'd since the last call.
     const char *ver = system_get_sdk_version();
-    os_uname_info_obj.items[2] = mp_obj_new_str(ver, strlen(ver), false);
+    os_uname_info_obj.items[2] = mp_obj_new_str(ver, strlen(ver));
     return (mp_obj_t)&os_uname_info_obj;
 }
 STATIC MP_DEFINE_CONST_FUN_OBJ_0(os_uname_obj, os_uname);
diff --git a/ports/stm32/modnwcc3k.c b/ports/stm32/modnwcc3k.c
index 8cc0a61..4f1af73 100644
--- a/ports/stm32/modnwcc3k.c
+++ b/ports/stm32/modnwcc3k.c
@@ -531,8 +531,8 @@
         netutils_format_ipv4_addr(ipconfig.aucDefaultGateway, NETUTILS_LITTLE),
         netutils_format_ipv4_addr(ipconfig.aucDNSServer, NETUTILS_LITTLE),
         netutils_format_ipv4_addr(ipconfig.aucDHCPServer, NETUTILS_LITTLE),
-        mp_obj_new_str(mac_vstr.buf, mac_vstr.len, false),
-        mp_obj_new_str((const char*)ipconfig.uaSSID, strlen((const char*)ipconfig.uaSSID), false),
+        mp_obj_new_str(mac_vstr.buf, mac_vstr.len),
+        mp_obj_new_str((const char*)ipconfig.uaSSID, strlen((const char*)ipconfig.uaSSID)),
     };
     return mp_obj_new_tuple(MP_ARRAY_SIZE(tuple), tuple);
 }
diff --git a/ports/unix/coverage.c b/ports/unix/coverage.c
index 651db0a..e2896c2 100644
--- a/ports/unix/coverage.c
+++ b/ports/unix/coverage.c
@@ -227,7 +227,7 @@
         mp_printf(&mp_plat_print, "# str\n");
 
         // intern string
-        mp_printf(&mp_plat_print, "%d\n", MP_OBJ_IS_QSTR(mp_obj_str_intern(mp_obj_new_str("intern me", 9, false))));
+        mp_printf(&mp_plat_print, "%d\n", MP_OBJ_IS_QSTR(mp_obj_str_intern(mp_obj_new_str("intern me", 9))));
     }
 
     // mpz
@@ -260,12 +260,12 @@
         // call mp_call_function_1_protected
         mp_call_function_1_protected(MP_OBJ_FROM_PTR(&mp_builtin_abs_obj), MP_OBJ_NEW_SMALL_INT(1));
         // call mp_call_function_1_protected with invalid args
-        mp_call_function_1_protected(MP_OBJ_FROM_PTR(&mp_builtin_abs_obj), mp_obj_new_str("abc", 3, false));
+        mp_call_function_1_protected(MP_OBJ_FROM_PTR(&mp_builtin_abs_obj), mp_obj_new_str("abc", 3));
 
         // call mp_call_function_2_protected
         mp_call_function_2_protected(MP_OBJ_FROM_PTR(&mp_builtin_divmod_obj), MP_OBJ_NEW_SMALL_INT(1), MP_OBJ_NEW_SMALL_INT(1));
         // call mp_call_function_2_protected with invalid args
-        mp_call_function_2_protected(MP_OBJ_FROM_PTR(&mp_builtin_divmod_obj), mp_obj_new_str("abc", 3, false), mp_obj_new_str("abc", 3, false));
+        mp_call_function_2_protected(MP_OBJ_FROM_PTR(&mp_builtin_divmod_obj), mp_obj_new_str("abc", 3), mp_obj_new_str("abc", 3));
     }
 
     // warning
diff --git a/ports/unix/main.c b/ports/unix/main.c
index e1cd33f..25f3e04 100644
--- a/ports/unix/main.c
+++ b/ports/unix/main.c
@@ -481,7 +481,7 @@
             vstr_add_strn(&vstr, p + 1, p1 - p - 1);
             path_items[i] = mp_obj_new_str_from_vstr(&mp_type_str, &vstr);
         } else {
-            path_items[i] = MP_OBJ_NEW_QSTR(qstr_from_strn(p, p1 - p));
+            path_items[i] = mp_obj_new_str_via_qstr(p, p1 - p);
         }
         p = p1 + 1;
     }
@@ -537,7 +537,7 @@
                     return usage(argv);
                 }
                 mp_obj_t import_args[4];
-                import_args[0] = mp_obj_new_str(argv[a + 1], strlen(argv[a + 1]), false);
+                import_args[0] = mp_obj_new_str(argv[a + 1], strlen(argv[a + 1]));
                 import_args[1] = import_args[2] = mp_const_none;
                 // Ask __import__ to handle imported module specially - set its __name__
                 // to __main__, and also return this leaf module, not top-level package
@@ -603,7 +603,7 @@
 
             // Set base dir of the script as first entry in sys.path
             char *p = strrchr(basedir, '/');
-            path_items[0] = MP_OBJ_NEW_QSTR(qstr_from_strn(basedir, p - basedir));
+            path_items[0] = mp_obj_new_str_via_qstr(basedir, p - basedir);
             free(pathbuf);
 
             set_sys_argv(argv, argc, a);
diff --git a/ports/unix/modffi.c b/ports/unix/modffi.c
index 78adcca..024f83c 100644
--- a/ports/unix/modffi.c
+++ b/ports/unix/modffi.c
@@ -144,7 +144,7 @@
             if (!s) {
                 return mp_const_none;
             }
-            return mp_obj_new_str(s, strlen(s), false);
+            return mp_obj_new_str(s, strlen(s));
         }
         case 'v':
             return mp_const_none;
diff --git a/ports/unix/modjni.c b/ports/unix/modjni.c
index f29c095..8ec5ae5 100644
--- a/ports/unix/modjni.c
+++ b/ports/unix/modjni.c
@@ -337,7 +337,7 @@
         return mp_const_none;
     } else if (JJ(IsInstanceOf, jo, String_class)) {
         const char *s = JJ(GetStringUTFChars, jo, NULL);
-        mp_obj_t ret = mp_obj_new_str(s, strlen(s), false);
+        mp_obj_t ret = mp_obj_new_str(s, strlen(s));
         JJ(ReleaseStringUTFChars, jo, s);
         return ret;
     } else if (JJ(IsInstanceOf, jo, Class_class)) {
diff --git a/ports/unix/modos.c b/ports/unix/modos.c
index 327116a..808d12a 100644
--- a/ports/unix/modos.c
+++ b/ports/unix/modos.c
@@ -133,7 +133,7 @@
     if (s == NULL) {
         return mp_const_none;
     }
-    return mp_obj_new_str(s, strlen(s), false);
+    return mp_obj_new_str(s, strlen(s));
 }
 STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_os_getenv_obj, mod_os_getenv);
 
@@ -171,7 +171,7 @@
     }
 
     mp_obj_tuple_t *t = MP_OBJ_TO_PTR(mp_obj_new_tuple(3, NULL));
-    t->items[0] = mp_obj_new_str(dirent->d_name, strlen(dirent->d_name), false);
+    t->items[0] = mp_obj_new_str(dirent->d_name, strlen(dirent->d_name));
     #ifdef _DIRENT_HAVE_D_TYPE
     t->items[1] = MP_OBJ_NEW_SMALL_INT(dirent->d_type);
     #else
diff --git a/ports/zephyr/modusocket.c b/ports/zephyr/modusocket.c
index e021c3a..95414a4 100644
--- a/ports/zephyr/modusocket.c
+++ b/ports/zephyr/modusocket.c
@@ -91,7 +91,7 @@
     net_addr_ntop(addr->sa_family, &sockaddr_in6->sin6_addr, buf, sizeof(buf));
     mp_obj_tuple_t *tuple = mp_obj_new_tuple(addr->sa_family == AF_INET ? 2 : 4, NULL);
 
-    tuple->items[0] = mp_obj_new_str(buf, strlen(buf), false);
+    tuple->items[0] = mp_obj_new_str(buf, strlen(buf));
     // We employ the fact that port offset is the same for IPv4 & IPv6
     // not filled in
     //tuple->items[1] = mp_obj_new_int(ntohs(((struct sockaddr_in*)addr)->sin_port));
diff --git a/py/binary.c b/py/binary.c
index 870a094..f509ff0 100644
--- a/py/binary.c
+++ b/py/binary.c
@@ -206,7 +206,7 @@
         return (mp_obj_t)(mp_uint_t)val;
     } else if (val_type == 'S') {
         const char *s_val = (const char*)(uintptr_t)(mp_uint_t)val;
-        return mp_obj_new_str(s_val, strlen(s_val), false);
+        return mp_obj_new_str(s_val, strlen(s_val));
 #if MICROPY_PY_BUILTINS_FLOAT
     } else if (val_type == 'f') {
         union { uint32_t i; float f; } fpu = {val};
diff --git a/py/builtinhelp.c b/py/builtinhelp.c
index c999290..7106f3c 100644
--- a/py/builtinhelp.c
+++ b/py/builtinhelp.c
@@ -69,7 +69,7 @@
     while (*name) {
         size_t l = strlen(name);
         // name should end in '.py' and we strip it off
-        mp_obj_list_append(list, mp_obj_new_str(name, l - 3, false));
+        mp_obj_list_append(list, mp_obj_new_str(name, l - 3));
         name += l + 1;
     }
 }
diff --git a/py/builtinimport.c b/py/builtinimport.c
index 04ce667..9235e94 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -434,7 +434,7 @@
                     DEBUG_printf("%.*s is dir\n", vstr_len(&path), vstr_str(&path));
                     // https://docs.python.org/3/reference/import.html
                     // "Specifically, any module that contains a __path__ attribute is considered a package."
-                    mp_store_attr(module_obj, MP_QSTR___path__, mp_obj_new_str(vstr_str(&path), vstr_len(&path), false));
+                    mp_store_attr(module_obj, MP_QSTR___path__, mp_obj_new_str(vstr_str(&path), vstr_len(&path)));
                     size_t orig_path_len = path.len;
                     vstr_add_char(&path, PATH_SEP_CHAR);
                     vstr_add_str(&path, "__init__.py");
diff --git a/py/modbuiltins.c b/py/modbuiltins.c
index 65c03d5..ebff5f5 100644
--- a/py/modbuiltins.c
+++ b/py/modbuiltins.c
@@ -159,12 +159,12 @@
     } else {
         mp_raise_ValueError("chr() arg not in range(0x110000)");
     }
-    return mp_obj_new_str(str, len, true);
+    return mp_obj_new_str_via_qstr(str, len);
     #else
     mp_int_t ord = mp_obj_get_int(o_in);
     if (0 <= ord && ord <= 0xff) {
         char str[1] = {ord};
-        return mp_obj_new_str(str, 1, true);
+        return mp_obj_new_str_via_qstr(str, 1);
     } else {
         mp_raise_ValueError("chr() arg not in range(256)");
     }
diff --git a/py/modio.c b/py/modio.c
index 353a002..828bcec 100644
--- a/py/modio.c
+++ b/py/modio.c
@@ -176,7 +176,7 @@
         return MP_OBJ_FROM_PTR(o);
     }
 
-    mp_obj_t path_out = mp_obj_new_str(path_buf.buf, path_buf.len, false);
+    mp_obj_t path_out = mp_obj_new_str(path_buf.buf, path_buf.len);
     return mp_builtin_open(1, &path_out, (mp_map_t*)&mp_const_empty_map);
 }
 MP_DEFINE_CONST_FUN_OBJ_2(resource_stream_obj, resource_stream);
diff --git a/py/obj.h b/py/obj.h
index 77f0f22..31c3ce9 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -637,7 +637,8 @@
 mp_obj_t mp_obj_new_int_from_str_len(const char **str, size_t len, bool neg, unsigned int base);
 mp_obj_t mp_obj_new_int_from_ll(long long val); // this must return a multi-precision integer object (or raise an overflow exception)
 mp_obj_t mp_obj_new_int_from_ull(unsigned long long val); // this must return a multi-precision integer object (or raise an overflow exception)
-mp_obj_t mp_obj_new_str(const char* data, size_t len, bool make_qstr_if_not_already);
+mp_obj_t mp_obj_new_str(const char* data, size_t len);
+mp_obj_t mp_obj_new_str_via_qstr(const char* data, size_t len);
 mp_obj_t mp_obj_new_str_from_vstr(const mp_obj_type_t *type, vstr_t *vstr);
 mp_obj_t mp_obj_new_bytes(const byte* data, size_t len);
 mp_obj_t mp_obj_new_bytearray(size_t n, void *items);
diff --git a/py/objstr.c b/py/objstr.c
index 51da7a4..5c464ba 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -176,7 +176,7 @@
                     mp_raise_msg(&mp_type_UnicodeError, NULL);
                 }
                 #endif
-                return mp_obj_new_str(bufinfo.buf, bufinfo.len, false);
+                return mp_obj_new_str(bufinfo.buf, bufinfo.len);
             }
     }
 }
@@ -423,7 +423,7 @@
         if (MICROPY_PY_BUILTINS_STR_UNICODE || type == &mp_type_bytes) {
             return MP_OBJ_NEW_SMALL_INT(self_data[index_val]);
         } else {
-            return mp_obj_new_str((char*)&self_data[index_val], 1, true);
+            return mp_obj_new_str_via_qstr((char*)&self_data[index_val], 1);
         }
     } else {
         return MP_OBJ_NULL; // op not supported
@@ -1046,7 +1046,7 @@
             } else {
                 const char *lookup;
                 for (lookup = field_name; lookup < field_name_top && *lookup != '.' && *lookup != '['; lookup++);
-                mp_obj_t field_q = mp_obj_new_str(field_name, lookup - field_name, true/*?*/);
+                mp_obj_t field_q = mp_obj_new_str_via_qstr(field_name, lookup - field_name); // should it be via qstr?
                 field_name = lookup;
                 mp_map_elem_t *key_elem = mp_map_lookup(kwargs, field_q, MP_MAP_LOOKUP);
                 if (key_elem == NULL) {
@@ -1413,7 +1413,7 @@
                 }
                 ++str;
             }
-            mp_obj_t k_obj = mp_obj_new_str((const char*)key, str - key, true);
+            mp_obj_t k_obj = mp_obj_new_str_via_qstr((const char*)key, str - key);
             arg = mp_obj_dict_get(dict, k_obj);
             str++;
         }
@@ -1992,6 +1992,11 @@
     return MP_OBJ_FROM_PTR(o);
 }
 
+// Create a str using a qstr to store the data; may use existing or new qstr.
+mp_obj_t mp_obj_new_str_via_qstr(const char* data, size_t len) {
+    return MP_OBJ_NEW_QSTR(qstr_from_strn(data, len));
+}
+
 // Create a str/bytes object from the given vstr.  The vstr buffer is resized to
 // the exact length required and then reused for the str/bytes object.  The vstr
 // is cleared and can safely be passed to vstr_free if it was heap allocated.
@@ -2022,25 +2027,20 @@
     return MP_OBJ_FROM_PTR(o);
 }
 
-mp_obj_t mp_obj_new_str(const char* data, size_t len, bool make_qstr_if_not_already) {
-    if (make_qstr_if_not_already) {
-        // use existing, or make a new qstr
-        return MP_OBJ_NEW_QSTR(qstr_from_strn(data, len));
+mp_obj_t mp_obj_new_str(const char* data, size_t len) {
+    qstr q = qstr_find_strn(data, len);
+    if (q != MP_QSTR_NULL) {
+        // qstr with this data already exists
+        return MP_OBJ_NEW_QSTR(q);
     } else {
-        qstr q = qstr_find_strn(data, len);
-        if (q != MP_QSTR_NULL) {
-            // qstr with this data already exists
-            return MP_OBJ_NEW_QSTR(q);
-        } else {
-            // no existing qstr, don't make one
-            return mp_obj_new_str_of_type(&mp_type_str, (const byte*)data, len);
-        }
+        // no existing qstr, don't make one
+        return mp_obj_new_str_of_type(&mp_type_str, (const byte*)data, len);
     }
 }
 
 mp_obj_t mp_obj_str_intern(mp_obj_t str) {
     GET_STR_DATA_LEN(str, data, len);
-    return MP_OBJ_NEW_QSTR(qstr_from_strn((const char*)data, len));
+    return mp_obj_new_str_via_qstr((const char*)data, len);
 }
 
 mp_obj_t mp_obj_new_bytes(const byte* data, size_t len) {
@@ -2138,7 +2138,7 @@
     mp_obj_str8_it_t *self = MP_OBJ_TO_PTR(self_in);
     GET_STR_DATA_LEN(self->str, str, len);
     if (self->cur < len) {
-        mp_obj_t o_out = mp_obj_new_str((const char*)str + self->cur, 1, true);
+        mp_obj_t o_out = mp_obj_new_str_via_qstr((const char*)str + self->cur, 1);
         self->cur += 1;
         return o_out;
     } else {
diff --git a/py/objstrunicode.c b/py/objstrunicode.c
index 29f7695..a1f54b8 100644
--- a/py/objstrunicode.c
+++ b/py/objstrunicode.c
@@ -216,7 +216,7 @@
                 ++len;
             }
         }
-        return mp_obj_new_str((const char*)s, len, true); // This will create a one-character string
+        return mp_obj_new_str_via_qstr((const char*)s, len); // This will create a one-character string
     } else {
         return MP_OBJ_NULL; // op not supported
     }
@@ -291,7 +291,7 @@
     if (self->cur < len) {
         const byte *cur = str + self->cur;
         const byte *end = utf8_next_char(str + self->cur);
-        mp_obj_t o_out = mp_obj_new_str((const char*)cur, end - cur, true);
+        mp_obj_t o_out = mp_obj_new_str_via_qstr((const char*)cur, end - cur);
         self->cur += end - cur;
         return o_out;
     } else {