From 89452be641674601e9bfce86dc71c17c3140a6cf Mon Sep 17 00:00:00 2001 From: Chris Angelico Date: Fri, 6 Jun 2014 05:28:47 +1000 Subject: [PATCH] Update comments - now aiming for UTF-8 rather than PEP 393 strings --- py/objstr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/objstr.h b/py/objstr.h index 0db2b31e4a..6c9e446455 100644 --- a/py/objstr.h +++ b/py/objstr.h @@ -30,8 +30,8 @@ typedef struct _mp_obj_str_t { machine_uint_t hash : 16; // len == number of bytes used in data, alloc = len + 1 because (at the moment) we also append a null byte machine_uint_t len : 16; - char flags; //PEP 393-style flags - const void *data; //Character data may be 1-byte, 2-bytes, or 4-bytes per character depending on flags + char flags; //Currently unused, always 1. Will later get markers eg ASCII-only. + const void *data; //Character data is encoded UTF-8 and should not be blindly indexed. } mp_obj_str_t; #define MP_DEFINE_STR_OBJ(obj_name, str) mp_obj_str_t obj_name = {{&mp_type_str}, 0, sizeof(str) - 1, 1, (const byte*)str};