summaryrefslogtreecommitdiff
path: root/py/objstrunicode.c
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2020-08-04 11:15:22 -0500
committerJeff Epler <jepler@gmail.com>2020-08-04 14:45:45 -0500
commit89797fd3f9d36cd7e2e7a125dbbe02f598874060 (patch)
tree83707505ca82d0847cf0419454956926a8761733 /py/objstrunicode.c
parentc37a25f0e5d1c877909855f6a3294e43b854bbbd (diff)
various: Use mp_obj_get_type_qstr more widely
This removes runtime allocations of the cstring version of the qstring. It is not a size improvement
Diffstat (limited to 'py/objstrunicode.c')
-rw-r--r--py/objstrunicode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objstrunicode.c b/py/objstrunicode.c
index 351a67e91..19d89a31c 100644
--- a/py/objstrunicode.c
+++ b/py/objstrunicode.c
@@ -151,7 +151,7 @@ const byte *str_index_to_ptr(const mp_obj_type_t *type, const byte *self_data, s
if (MP_OBJ_IS_SMALL_INT(index)) {
i = MP_OBJ_SMALL_INT_VALUE(index);
} else if (!mp_obj_get_int_maybe(index, &i)) {
- mp_raise_TypeError_varg(translate("string indices must be integers, not %s"), mp_obj_get_type_str(index));
+ mp_raise_TypeError_varg(translate("string indices must be integers, not %q"), mp_obj_get_type_qstr(index));
}
const byte *s, *top = self_data + self_len;
if (i < 0)