Reduce size of struct string_it_t on 64 bits
by storing an offset to the next character instead of a pointer. An offset can be stored as a BYTE instead of a PTR since UT-8 can use at most 4 characters per code point.
This commit is contained in:
1 parent
0b853c6d52
commit
442b0e7cea
2 files changed
+9
-7
No files matched your search
@@ -46,7 +46,7 @@ static void test_utf8_basic(void)
|
||||
assert (b == false);
|
||||
assert (it->u == i);
|
||||
assert (string_get_cref(it) == i);
|
||||
assert (*it->next_ptr == 0);
|
||||
assert (it->ptr[it->next_ptr] == 0);
|
||||
assert (m_str1ng_utf8_length(buf) == 1);
|
||||
assert (m_str1ng_utf8_valid_str_p(buf) == true);
|
||||
/* Higher level access */
|
||||
|
||||
Reference in new issue
Block a user