* Add length param for seralization write_string
to increase a little bit the performance for big strings. * Change the format of storing strings for serial-bin.
This commit is contained in:
1 parent
89b6e1aac0
commit
cb4b43e2e8
6 files changed
+108
-24
No files matched your search
+2
-2
@@ -1241,7 +1241,7 @@ static inline m_serial_return_code_t
|
||||
string_out_serial(m_serial_write_t serial, const string_t v)
|
||||
{
|
||||
assert (serial != NULL && serial->m_interface != NULL);
|
||||
return serial->m_interface->write_string(serial, string_get_cstr(v));
|
||||
return serial->m_interface->write_string(serial, string_get_cstr(v), string_size(v) );
|
||||
}
|
||||
|
||||
/* Read the formatted string from the serializer
|
||||
@@ -2047,7 +2047,7 @@ namespace m_string {
|
||||
{ \
|
||||
BOUNDED_STRINGI_CONTRACT(v, max_size); \
|
||||
assert (serial != NULL && serial->m_interface != NULL); \
|
||||
return serial->m_interface->write_string(serial, v->s); \
|
||||
return serial->m_interface->write_string(serial, v->s, strlen(v->s) ); \
|
||||
} \
|
||||
\
|
||||
static inline m_serial_return_code_t \
|
||||
|
||||
Reference in new issue
Block a user