Rename internal string functions to be compliant with new scheme. Not sure if this scheme will remain however (still searching for a better naming that fits all criteria).
This commit is contained in:
1 parent
3b6907b743
commit
07db846f3b
3 files changed
+214
-214
No files matched your search
+2
-2
@@ -429,8 +429,8 @@ m_serial_bin_read_string(m_serial_read_t serial, struct string_s *s){
|
||||
size_t length;
|
||||
if (m_serial_bin_read_size(f, &length) != true) return m_core_serial_fail();
|
||||
// Use of internal string interface to dimension the string
|
||||
char *p = stringi_fit2size(s, length + 1);
|
||||
stringi_set_size(s, length);
|
||||
char *p = m_str1ng_fit2size(s, length + 1);
|
||||
m_str1ng_set_size(s, length);
|
||||
// Read the characters excluding the final null one.
|
||||
// NOTE: fread supports length == 0.
|
||||
size_t n = fread(M_ASSIGN_CAST(void*, p), 1, length, f);
|
||||
|
||||
+209
-209
File diff suppressed because it is too large.
Load diff
@@ -39,7 +39,7 @@ static void test_utf8_basic(void)
|
||||
if (i < 0xD800U || i > 0xDFFFU) {
|
||||
string_it_t it;
|
||||
char buf[5] = {0};
|
||||
stringi_utf8_encode (buf, i);
|
||||
m_str1ng_utf8_encode (buf, i);
|
||||
/* Low level access for internal testing */
|
||||
it->ptr = buf;
|
||||
bool b = string_end_p(it);
|
||||
@@ -47,8 +47,8 @@ static void test_utf8_basic(void)
|
||||
assert (it->u == i);
|
||||
assert (string_get_cref(it) == i);
|
||||
assert (*it->next_ptr == 0);
|
||||
assert (stringi_utf8_length(buf) == 1);
|
||||
assert (stringi_utf8_valid_str_p(buf) == true);
|
||||
assert (m_str1ng_utf8_length(buf) == 1);
|
||||
assert (m_str1ng_utf8_valid_str_p(buf) == true);
|
||||
/* Higher level access */
|
||||
string_clean(s);
|
||||
string_push_u(s, i);
|
||||
|
||||
Reference in new issue
Block a user