shared/strbuf: add nm_str_buf_get_str_unsafe() helper function to give direct access to string buffer

This commit is contained in:
Thomas Haller 2020-04-06 10:47:49 +02:00
parent 7dc467bbbc
commit f8efed528d

View file

@ -217,6 +217,13 @@ nm_str_buf_get_str (NMStrBuf *strbuf)
return strbuf->_str;
}
static inline char *
nm_str_buf_get_str_unsafe (NMStrBuf *strbuf)
{
_nm_str_buf_assert (strbuf);
return strbuf->_str;
}
/**
* nm_str_buf_finalize:
* @strbuf: an initilized #NMStrBuf