diff options
author | Thomas Haller <thaller@redhat.com> | 2020-04-06 10:47:49 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-04-09 21:51:06 +0200 |
commit | c0bda4a8c0ee6daa10d118ddc5f298710b59cc15 (patch) | |
tree | 3d71495104ba064c4d71c25b4df77894cc31b738 | |
parent | 90c7cb8e9cbae47595813a2a7e2e9eae35152eb1 (diff) | |
download | NetworkManager-c0bda4a8c0ee6daa10d118ddc5f298710b59cc15.tar.gz |
shared/strbuf: add nm_str_buf_get_str_unsafe() helper function to give direct access to string buffer
-rw-r--r-- | shared/nm-glib-aux/nm-str-buf.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-str-buf.h b/shared/nm-glib-aux/nm-str-buf.h index 933b837577..83cf275623 100644 --- a/shared/nm-glib-aux/nm-str-buf.h +++ b/shared/nm-glib-aux/nm-str-buf.h @@ -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 |