diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-06-13 21:23:00 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-06-14 01:21:13 +0300 |
commit | 2ec38a17d4e357f8f12ee6a2643e2dd2ff7a426e (patch) | |
tree | 5bc282117e32cb70604b617d5692900529cc9ded /py/obj.h | |
parent | e9036c295ca1240946c122044e86ba8b569184e1 (diff) |
objstr: Be 8-bit clean even for repr().
This will allow roughly the same behavior as Python3 for non-ASCII strings,
for example, print("<phrase in non-Latin script>".split()) will print list
of words, not weird hex dump (like Python2 behaves). (Of course, that it
will print list of words, if there're "words" in that phrase at all, separated
by ASCII-compatible whitespace; that surely won't apply to every human
language in existence).
Diffstat (limited to 'py/obj.h')
-rw-r--r-- | py/obj.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -469,7 +469,7 @@ qstr mp_obj_str_get_qstr(mp_obj_t self_in); // use this if you will anyway conve const char *mp_obj_str_get_str(mp_obj_t self_in); // use this only if you need the string to be null terminated const char *mp_obj_str_get_data(mp_obj_t self_in, uint *len); mp_obj_t mp_obj_str_intern(mp_obj_t str); -void mp_str_print_quoted(void (*print)(void *env, const char *fmt, ...), void *env, const byte *str_data, uint str_len); +void mp_str_print_quoted(void (*print)(void *env, const char *fmt, ...), void *env, const byte *str_data, uint str_len, bool is_bytes); #if MICROPY_PY_BUILTINS_FLOAT // float |