mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 01:50:08 +01:00
shared/strbuf: don't have const values in NMStrBuf
Before, if a struct had a field of type NMStrBuf (which is sensible to do),
then you could not longer initialize the entire struct with
*ptr = (Type) { };
because NMStrBuf contained const fields.
The user should never set these fields directly and use nm_str_buf_*() to modify
them them. But no longer mark them as const, because that breaks valid
use cases.
This commit is contained in:
parent
43ba2cb933
commit
7ff170a28f
1 changed files with 1 additions and 1 deletions
|
|
@ -13,7 +13,7 @@
|
|||
typedef struct _NMStrBuf {
|
||||
char *_str;
|
||||
union {
|
||||
const gsize len;
|
||||
/*const*/ gsize len;
|
||||
gsize _len;
|
||||
};
|
||||
gsize _allocated;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue