diff options
| author | Jeff Epler <jepler@gmail.com> | 2020-08-04 11:15:22 -0500 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2020-08-04 14:45:45 -0500 |
| commit | 89797fd3f9d36cd7e2e7a125dbbe02f598874060 (patch) | |
| tree | 83707505ca82d0847cf0419454956926a8761733 /ports | |
| parent | c37a25f0e5d1c877909855f6a3294e43b854bbbd (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 'ports')
| -rw-r--r-- | ports/unix/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/unix/file.c b/ports/unix/file.c index e4f62e3d5..222dca462 100644 --- a/ports/unix/file.c +++ b/ports/unix/file.c @@ -60,7 +60,7 @@ extern const mp_obj_type_t mp_type_textio; STATIC void fdfile_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { (void)kind; mp_obj_fdfile_t *self = MP_OBJ_TO_PTR(self_in); - mp_printf(print, "<io.%s %d>", mp_obj_get_type_str(self_in), self->fd); + mp_printf(print, "<io.%q %d>", mp_obj_get_type_qstr(self_in), self->fd); } STATIC mp_uint_t fdfile_read(mp_obj_t o_in, void *buf, mp_uint_t size, int *errcode) { |
