diff --git a/m-array.h b/m-array.h index c4f80ab7..d3e98a7e 100644 --- a/m-array.h +++ b/m-array.h @@ -892,11 +892,11 @@ \ M_IF_METHOD(GET_STR, oplist)( \ static inline void \ - M_C(name, _get_str)(string_t str, array_t const array, \ + M_C(name, _get_str)(m_string_t str, array_t const array, \ bool append) \ { \ M_ARRA4_CONTRACT(array); \ - (append ? string_cat_str : string_set_str) (str, "["); \ + (append ? m_string_cat_str : m_string_set_str) (str, "["); \ it_t it; \ for (M_C(name, _it)(it, array) ; \ !M_C(name, _end_p)(it); \ @@ -904,9 +904,9 @@ type const *item = M_C(name, _cref)(it); \ M_CALL_GET_STR(oplist, str, *item, true); \ if (!M_C(name, _last_p)(it)) \ - string_push_back (str, M_GET_SEPARATOR oplist); \ + m_string_push_back (str, M_GET_SEPARATOR oplist); \ } \ - string_push_back (str, ']'); \ + m_string_push_back (str, ']'); \ } \ , /* no GET_STR */ ) \ \ diff --git a/m-bitset.h b/m-bitset.h index 9e3f0a7a..ba494fb1 100644 --- a/m-bitset.h +++ b/m-bitset.h @@ -867,20 +867,20 @@ M_END_PROTECTED_CODE M_BEGIN_PROTECTED_CODE -/* Output to a string_t 'str' the formatted text representation of the bitset 'set' +/* Output to a m_string_t 'str' the formatted text representation of the bitset 'set' or append it to the strinf (append=true) */ static inline void -bitset_get_str(string_t str, const bitset_t set, bool append) +bitset_get_str(m_string_t str, const bitset_t set, bool append) { M_B1TSET_CONTRACT (set); M_ASSERT(str != NULL); - (append ? string_cat_str : string_set_str) (str, "["); + (append ? m_string_cat_str : m_string_set_str) (str, "["); for(size_t i = 0; i < set->size; i++) { const bool b = bitset_get (set, i); const char c = b ? '1' : '0'; - string_push_back (str, c); + m_string_push_back (str, c); } - string_push_back (str, ']'); + m_string_push_back (str, ']'); } M_END_PROTECTED_CODE diff --git a/m-bptree.h b/m-bptree.h index f5818125..8a45a2ae 100644 --- a/m-bptree.h +++ b/m-bptree.h @@ -1246,11 +1246,11 @@ , /* NO HASH METHOD */ ) \ \ M_IF_METHOD_BOTH(GET_STR, key_oplist, value_oplist)( \ - static inline void M_C(name, _get_str)(string_t str, \ + static inline void M_C(name, _get_str)(m_string_t str, \ const tree_t t1, bool append) { \ M_BPTR33_CONTRACT(N, isMulti, key_oplist, t1); \ M_ASSERT(str != NULL); \ - (append ? string_cat_str : string_set_str) (str, "["); \ + (append ? m_string_cat_str : m_string_set_str) (str, "["); \ /* NOTE: The print is really naive, and not really efficient */ \ bool commaToPrint = false; \ it_t it; \ @@ -1258,18 +1258,18 @@ !M_C(name, _end_p)(it); \ M_C(name, _next)(it)) { \ if (commaToPrint) \ - string_push_back (str, M_GET_SEPARATOR key_oplist); \ + m_string_push_back (str, M_GET_SEPARATOR key_oplist); \ commaToPrint = true; \ subtype_t const *ref1 = M_C(name, _cref)(it); \ M_IF(isMap)( \ M_CALL_GET_STR(key_oplist, str, *ref1->key_ptr, true); \ - string_cat_str(str, ":"); \ + m_string_cat_str(str, ":"); \ M_CALL_GET_STR(value_oplist,str, *ref1->value_ptr, true) \ , \ M_CALL_GET_STR(key_oplist, str, *ref1, true); \ ); \ } \ - string_push_back (str, ']'); \ + m_string_push_back (str, ']'); \ } \ , /* NO GET_STR */ ) \ \ diff --git a/m-concurrent.h b/m-concurrent.h index f0a27924..0a28c83d 100644 --- a/m-concurrent.h +++ b/m-concurrent.h @@ -555,7 +555,7 @@ \ M_IF_METHOD(GET_STR, oplist)( \ static inline void \ - M_C(name, _get_str)(string_t str, concurrent_t const out, bool a) \ + M_C(name, _get_str)(m_string_t str, concurrent_t const out, bool a) \ { \ M_C0NCURRENT_CONTRACT(out); \ M_C(name, _read_lock)(out); \ diff --git a/m-core.h b/m-core.h index 4a758d9b..b10bb30d 100644 --- a/m-core.h +++ b/m-core.h @@ -2168,9 +2168,9 @@ M_FSCAN_DEFAULT_TYPE_DEF(m_core_fscan_ldouble, long double, "%Lf") #endif -/* Transform a C variable into a string_t (needs m-string.h) */ +/* Transform a C variable into a m_string_t (needs m-string.h) */ #define M_GET_STRING_ARG(str, x, append) \ - (append ? string_cat_printf : string_printf) (str, M_PRINTF_FORMAT(x), M_CORE_PRINTF_ARG(x)) + (append ? m_string_cat_printf : m_string_printf) (str, M_PRINTF_FORMAT(x), M_CORE_PRINTF_ARG(x)) /* No use of GET_STR if no inclusion of m-string */ #define M_GET_STR_METHOD_FOR_DEFAULT_TYPE /* */ @@ -3389,7 +3389,7 @@ m_core_parse2_enum (const char str[], const char **endptr) #define M_ENUM_IN_SERIAL(oplist, var, serial) \ ( var = (M_GET_TYPE oplist)(true ? m_core_in_serial_enum(serial) : 0), (serial)->tmp.r) #define M_ENUM_GET_STR(str, var, append) \ - ((append ? string_cat_printf : string_printf) (str, "%lld", (long long) (var) )) + ((append ? m_string_cat_printf : m_string_printf) (str, "%lld", (long long) (var) )) #define M_ENUM_PARSE(oplist, var, str, endptr) \ ( var = (M_GET_TYPE oplist) (true ? m_core_parse1_enum(str) : 0), m_core_parse2_enum(str, endptr)) @@ -3858,7 +3858,7 @@ m_core_backoff_clear(m_core_backoff_ct backoff) /********************** Serialization ***********************/ /************************************************************/ -/* Forward declaration of string_t defined in m-string.h */ +/* Forward declaration of m_string_t defined in m-string.h */ struct m_string_s; /* Serialization Return code: diff --git a/m-deque.h b/m-deque.h index 29050226..4f284385 100644 --- a/m-deque.h +++ b/m-deque.h @@ -896,10 +896,10 @@ \ M_IF_METHOD(GET_STR, oplist)( \ static inline void \ - M_C(name, _get_str)(string_t str, deque_t const deque, bool append) \ + M_C(name, _get_str)(m_string_t str, deque_t const deque, bool append) \ { \ M_D3QU3_CONTRACT(deque); \ - (append ? string_cat_str : string_set_str) (str, "["); \ + (append ? m_string_cat_str : m_string_set_str) (str, "["); \ it_t it; \ for (M_C(name, _it)(it, deque) ; \ !M_C(name, _end_p)(it); \ @@ -907,9 +907,9 @@ type const *item = M_C(name, _cref)(it); \ M_CALL_GET_STR(oplist, str, *item, true); \ if (!M_C(name, _last_p)(it)) \ - string_push_back (str, M_GET_SEPARATOR oplist); \ + m_string_push_back (str, M_GET_SEPARATOR oplist); \ } \ - string_push_back (str, ']'); \ + m_string_push_back (str, ']'); \ } \ , /* no GET_STR */ ) \ \ diff --git a/m-dict.h b/m-dict.h index 3be72ab7..8c32ed16 100644 --- a/m-dict.h +++ b/m-dict.h @@ -767,27 +767,27 @@ \ M_IF_METHOD_BOTH(GET_STR, key_oplist, value_oplist)( \ static inline void \ - M_C(name, _get_str)(string_t str, const dict_t dict, const bool append) \ + M_C(name, _get_str)(m_string_t str, const dict_t dict, const bool append) \ { \ - (append ? string_cat_str : string_set_str) (str, "{"); \ + (append ? m_string_cat_str : m_string_set_str) (str, "{"); \ dict_it_t it; \ bool print_comma = false; \ for (M_C(name, _it)(it, dict) ; \ !M_C(name, _end_p)(it); \ M_C(name, _next)(it)){ \ if (print_comma) \ - string_push_back (str, ','); \ + m_string_push_back (str, ','); \ const it_deref_t *item = M_C(name, _cref)(it); \ M_IF(isSet)( \ M_CALL_GET_STR(key_oplist, str, *item, true); \ , \ M_CALL_GET_STR(key_oplist, str, item->key, true); \ - string_push_back (str, ':'); \ + m_string_push_back (str, ':'); \ M_CALL_GET_STR(value_oplist, str, item->value, true); \ ) \ print_comma = true; \ } \ - string_push_back (str, '}'); \ + m_string_push_back (str, '}'); \ } \ , /* no GET_STR */ ) \ \ diff --git a/m-list.h b/m-list.h index 694a858a..200331a2 100644 --- a/m-list.h +++ b/m-list.h @@ -682,11 +682,11 @@ \ M_IF_METHOD(GET_STR, oplist)( \ static inline void \ - M_C(name, _get_str)(string_t str, const list_t list, \ + M_C(name, _get_str)(m_string_t str, const list_t list, \ bool append) \ { \ M_ASSERT (str != NULL && list != NULL); \ - (append ? string_cat_str : string_set_str) (str, "["); \ + (append ? m_string_cat_str : m_string_set_str) (str, "["); \ it_t it; \ for (M_C(name, _it)(it, list) ; \ !M_C(name, _end_p)(it); \ @@ -694,9 +694,9 @@ type const *item = M_C(name, _cref)(it); \ M_CALL_GET_STR(oplist, str, *item, true); \ if (!M_C(name, _last_p)(it)) \ - string_push_back (str, M_GET_SEPARATOR oplist); \ + m_string_push_back (str, M_GET_SEPARATOR oplist); \ } \ - string_push_back (str, ']'); \ + m_string_push_back (str, ']'); \ } \ , /* no str */ ) \ \ diff --git a/m-rbtree.h b/m-rbtree.h index 355dada8..ef813f5f 100644 --- a/m-rbtree.h +++ b/m-rbtree.h @@ -1014,24 +1014,24 @@ typedef enum { , /* NO HASH METHOD */ ) \ \ M_IF_METHOD(GET_STR, oplist)( \ - static inline void M_C(name, _get_str)(string_t str, \ + static inline void M_C(name, _get_str)(m_string_t str, \ tree_t const t1, bool append) { \ M_RBTR33_CONTRACT(t1); \ M_ASSERT(str != NULL); \ - (append ? string_cat_str : string_set_str) (str, "["); \ + (append ? m_string_cat_str : m_string_set_str) (str, "["); \ /* NOTE: The print is really naive, and not really efficient */ \ bool commaToPrint = false; \ it_t it1; \ M_C(name, _it)(it1, t1); \ while (!M_C(name, _end_p)(it1)) { \ if (commaToPrint) \ - string_push_back (str, M_GET_SEPARATOR oplist); \ + m_string_push_back (str, M_GET_SEPARATOR oplist); \ commaToPrint = true; \ type const *ref1 = M_C(name, _cref)(it1); \ M_CALL_GET_STR(oplist, str, *ref1, true); \ M_C(name, _next)(it1); \ } \ - string_push_back (str, ']'); \ + m_string_push_back (str, ']'); \ } \ , /* NO GET_STR */ ) \ \ diff --git a/m-serial-json.h b/m-serial-json.h index 28e31722..b4410a29 100644 --- a/m-serial-json.h +++ b/m-serial-json.h @@ -74,13 +74,13 @@ m_ser1al_json_write_string(m_serial_write_t serial, const char data[], size_t le M_ASSERT_SLOW(length == strlen(data) ); FILE *f = (FILE *)serial->data[0].p; M_ASSERT(f != NULL && data != NULL); - /* HACK: Build dummy string to reuse string_out_str */ - string_t v2; + /* HACK: Build dummy string to reuse m_string_out_str */ + m_string_t v2; uintptr_t ptr = (uintptr_t) data; v2->u.heap.size = length; v2->u.heap.alloc = length + 1; v2->ptr = (char*)ptr; - string_out_str(f, v2); + m_string_out_str(f, v2); return M_SERIAL_OK_DONE; } @@ -354,11 +354,11 @@ m_ser1al_json_read_float(m_serial_read_t serial, long double *r, const size_t si Set 's' with the string if succeeds Return M_SERIAL_OK_DONE if it succeeds, M_SERIAL_FAIL otherwise */ static inline m_serial_return_code_t -m_ser1al_json_read_string(m_serial_read_t serial, struct string_s *s){ +m_ser1al_json_read_string(m_serial_read_t serial, struct m_string_s *s){ FILE *f = (FILE*) serial->data[0].p; int n = m_core_fscanf(f, " "); // Skip any leading spaces. (void) n; // Unused return value. - return string_in_str(s, f) ? M_SERIAL_OK_DONE : m_core_serial_fail(); + return m_string_in_str(s, f) ? M_SERIAL_OK_DONE : m_core_serial_fail(); } /* Start reading from the stream 'serial' an array. @@ -599,8 +599,8 @@ typedef m_serial_read_t m_serial_json_read_t; static inline m_serial_return_code_t m_ser1al_str_json_write_boolean(m_serial_write_t serial, const bool data) { - struct string_s *f = (struct string_s *)serial->data[0].p; - int n = string_cat_printf(f, "%s", data ? "true" : "false"); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + int n = m_string_cat_printf(f, "%s", data ? "true" : "false"); return n > 0 ? M_SERIAL_OK_DONE : m_core_serial_fail(); } @@ -610,8 +610,8 @@ static inline m_serial_return_code_t m_ser1al_str_json_write_integer(m_serial_write_t serial,const long long data, const size_t size_of_type) { (void) size_of_type; // Ignored - struct string_s *f = (struct string_s *)serial->data[0].p; - int n = string_cat_printf(f, "%lld", data); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + int n = m_string_cat_printf(f, "%lld", data); return n > 0 ? M_SERIAL_OK_DONE : m_core_serial_fail(); } @@ -621,8 +621,8 @@ static inline m_serial_return_code_t m_ser1al_str_json_write_float(m_serial_write_t serial, const long double data, const size_t size_of_type) { (void) size_of_type; // Ignored - struct string_s *f = (struct string_s *)serial->data[0].p; - int n = string_cat_printf(f, "%Lf", data); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + int n = m_string_cat_printf(f, "%Lf", data); return n > 0 ? M_SERIAL_OK_DONE : m_core_serial_fail(); } @@ -632,15 +632,15 @@ static inline m_serial_return_code_t m_ser1al_str_json_write_string(m_serial_write_t serial, const char data[], size_t length) { M_ASSERT_SLOW(length == strlen(data) ); - struct string_s *f = (struct string_s *)serial->data[0].p; + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; M_ASSERT(f != NULL && data != NULL); - /* HACK: Build dummy string to reuse string_get_str */ - string_t v2; + /* HACK: Build dummy string to reuse m_string_get_str */ + m_string_t v2; uintptr_t ptr = (uintptr_t) data; v2->u.heap.size = length; v2->u.heap.alloc = length + 1; v2->ptr = (char*)ptr; - string_get_str(f, v2, true); + m_string_get_str(f, v2, true); return M_SERIAL_OK_DONE; } @@ -655,8 +655,8 @@ m_ser1al_str_json_write_array_start(m_serial_local_t local, m_serial_write_t ser { (void) local; // argument not used (void) number_of_elements; // Ignored - struct string_s *f = (struct string_s *)serial->data[0].p; - string_push_back(f, '['); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + m_string_push_back(f, '['); return M_SERIAL_OK_CONTINUE; } @@ -666,8 +666,8 @@ static inline m_serial_return_code_t m_ser1al_str_json_write_array_next(m_serial_local_t local, m_serial_write_t serial) { (void) local; // argument not used - struct string_s *f = (struct string_s *)serial->data[0].p; - string_push_back(f, ','); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + m_string_push_back(f, ','); return M_SERIAL_OK_CONTINUE; } @@ -677,8 +677,8 @@ static inline m_serial_return_code_t m_ser1al_str_json_write_array_end(m_serial_local_t local, m_serial_write_t serial) { (void) local; // argument not used - struct string_s *f = (struct string_s *)serial->data[0].p; - string_push_back(f, ']'); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + m_string_push_back(f, ']'); return M_SERIAL_OK_CONTINUE; } @@ -693,8 +693,8 @@ m_ser1al_str_json_write_map_start(m_serial_local_t local, m_serial_write_t seria { (void) local; // argument not used (void) number_of_elements; // Ignored - struct string_s *f = (struct string_s *)serial->data[0].p; - string_push_back(f, '{'); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + m_string_push_back(f, '{'); return M_SERIAL_OK_CONTINUE; } @@ -704,8 +704,8 @@ static inline m_serial_return_code_t m_ser1al_str_json_write_map_value(m_serial_local_t local, m_serial_write_t serial) { (void) local; // argument not used - struct string_s *f = (struct string_s *)serial->data[0].p; - string_push_back(f, ':'); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + m_string_push_back(f, ':'); return M_SERIAL_OK_CONTINUE; } @@ -715,8 +715,8 @@ static inline m_serial_return_code_t m_ser1al_str_json_write_map_next(m_serial_local_t local, m_serial_write_t serial) { (void) local; // argument not used - struct string_s *f = (struct string_s *)serial->data[0].p; - string_push_back(f, ','); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + m_string_push_back(f, ','); return M_SERIAL_OK_CONTINUE; } @@ -726,8 +726,8 @@ static inline m_serial_return_code_t m_ser1al_str_json_write_map_end(m_serial_local_t local, m_serial_write_t serial) { (void) local; // argument not used - struct string_s *f = (struct string_s *)serial->data[0].p; - string_push_back(f, '}'); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + m_string_push_back(f, '}'); return M_SERIAL_OK_CONTINUE; } @@ -739,8 +739,8 @@ static inline m_serial_return_code_t m_ser1al_str_json_write_tuple_start(m_serial_local_t local, m_serial_write_t serial) { (void) local; // argument not used - struct string_s *f = (struct string_s *)serial->data[0].p; - string_push_back(f, '{'); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + m_string_push_back(f, '{'); return M_SERIAL_OK_CONTINUE; } @@ -751,8 +751,8 @@ m_ser1al_str_json_write_tuple_id(m_serial_local_t local, m_serial_write_t serial { (void) local; // argument not used (void) max; // Ignored - struct string_s *f = (struct string_s *)serial->data[0].p; - int n = string_cat_printf(f, "%c\"%s\":", index == 0 ? ' ' : ',', field_name[index]); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + int n = m_string_cat_printf(f, "%c\"%s\":", index == 0 ? ' ' : ',', field_name[index]); return n > 0 ? M_SERIAL_OK_CONTINUE : m_core_serial_fail(); } @@ -762,8 +762,8 @@ static inline m_serial_return_code_t m_ser1al_str_json_write_tuple_end(m_serial_local_t local, m_serial_write_t serial) { (void) local; // argument not used - struct string_s *f = (struct string_s *)serial->data[0].p; - string_push_back(f, '}'); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + m_string_push_back(f, '}'); return M_SERIAL_OK_CONTINUE; } @@ -777,14 +777,14 @@ m_ser1al_str_json_write_variant_start(m_serial_local_t local, m_serial_write_t s { (void) local; // argument not used (void) max; // argument not used - struct string_s *f = (struct string_s *)serial->data[0].p; + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; int n; if (index >= 0) { M_ASSERT (index < max); - n = string_cat_printf(f, "{\"%s\":", field_name[index]); + n = m_string_cat_printf(f, "{\"%s\":", field_name[index]); return n > 0 ? M_SERIAL_OK_CONTINUE : m_core_serial_fail(); } else { - n = string_cat_printf(f, "{}"); + n = m_string_cat_printf(f, "{}"); return n > 0 ? M_SERIAL_OK_DONE : m_core_serial_fail(); } } @@ -795,8 +795,8 @@ static inline m_serial_return_code_t m_ser1al_str_json_write_variant_end(m_serial_local_t local, m_serial_write_t serial) { (void) local; // argument not used - struct string_s *f = (struct string_s *)serial->data[0].p; - string_push_back(f, '}'); + struct m_string_s *f = (struct m_string_s *)serial->data[0].p; + m_string_push_back(f, '}'); return M_SERIAL_OK_CONTINUE; } @@ -821,10 +821,10 @@ static const m_serial_write_interface_t m_ser1al_str_json_write_interface = { }; /* Initialize the JSON serial object for writing any object to JSON format in the given FILE */ -static inline void m_serial_str_json_write_init(m_serial_write_t serial, string_t s) +static inline void m_serial_str_json_write_init(m_serial_write_t serial, m_string_t s) { serial->m_interface = &m_ser1al_str_json_write_interface; - serial->data[0].p = M_ASSIGN_CAST(struct string_s *, s); + serial->data[0].p = M_ASSIGN_CAST(struct m_string_s *, s); } /* CLear the JSON serial object for writing*/ @@ -942,11 +942,11 @@ m_ser1al_str_json_read_float(m_serial_read_t serial, long double *r, const size_ Set 's' with the string if succeeds Return M_SERIAL_OK_DONE if it succeeds, M_SERIAL_FAIL otherwise */ static inline m_serial_return_code_t -m_ser1al_str_json_read_string(m_serial_read_t serial, struct string_s *s){ +m_ser1al_str_json_read_string(m_serial_read_t serial, struct m_string_s *s){ const char **f = &serial->data[0].cstr; m_ser1al_str_json_skip(f); const char *e; - bool b = string_parse_str(s, *f, &e); + bool b = m_string_parse_str(s, *f, &e); serial->data[0].cstr = e; return b ? M_SERIAL_OK_DONE : m_core_serial_fail(); } diff --git a/m-tuple.h b/m-tuple.h index 6d70e73d..4acb17a6 100644 --- a/m-tuple.h +++ b/m-tuple.h @@ -441,19 +441,19 @@ namespace m_lib { /* Define a GET_STR method by calling the GET_STR methods for all params */ #define M_TUPL3_DEFINE_GET_STR(name, ...) \ - static inline void M_C(name, _get_str)(string_t str, \ + static inline void M_C(name, _get_str)(m_string_t str, \ M_C(name,_ct) const el, \ bool append) { \ bool comma = false; \ M_TUPL3_CONTRACT(el); \ M_ASSERT (str != NULL); \ - (append ? string_cat_str : string_set_str) (str, "("); \ + (append ? m_string_cat_str : m_string_set_str) (str, "("); \ M_MAP(M_TUPL3_DEFINE_GET_STR_FUNC , __VA_ARGS__) \ - string_push_back (str, ')'); \ + m_string_push_back (str, ')'); \ } #define M_TUPL3_DEFINE_GET_STR_FUNC(a) \ - if (comma) string_push_back (str, ','); \ + if (comma) m_string_push_back (str, ','); \ comma = true; \ M_TUPL3_CALL_GET_STR(a, str, el -> M_TUPL3_GET_FIELD a, true); \ @@ -639,7 +639,7 @@ namespace m_lib { /* INIT_WITH macro enabling recursive INIT_WITH initialization - tuple = { int, string_t, array } + tuple = { int, m_string_t, array } USAGE: M_LET( (x, 2, ("John"), ( ("Bear"), ("Rabbit") )), tuple_t) diff --git a/m-variant.h b/m-variant.h index 55b784fc..efe74655 100644 --- a/m-variant.h +++ b/m-variant.h @@ -517,19 +517,19 @@ /* Define the GET_STR function */ #define M_VAR1ANT_DEFINE_GET_STR(name, ...) \ - static inline void M_C(name, _get_str)(string_t str, \ + static inline void M_C(name, _get_str)(m_string_t str, \ M_C(name,_ct) const el, \ bool append) { \ M_VAR1ANT_CONTRACT(name, el); \ M_ASSERT (str != NULL); \ - void (*func)(string_t, const char *); \ - func = append ? string_cat_str : string_set_str; \ + void (*func)(m_string_t, const char *); \ + func = append ? m_string_cat_str : m_string_set_str; \ switch (el->type) { \ case M_C(name, _EMPTY): func(str, "@EMPTY@"); break; \ M_MAP2(M_VAR1ANT_DEFINE_GET_STR_FUNC , name, __VA_ARGS__) \ default: M_ASSERT(false); break; \ } \ - string_push_back (str, '@'); \ + m_string_push_back (str, '@'); \ } #define M_VAR1ANT_DEFINE_GET_STR_FUNC(name, a) \