mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 23:00:07 +01:00
shared: add nm_auto_unref_bytearray macro
Internally, GByteArray is actually a GArray, so it would be safe to use "gs_unref_array" macro. However, that is rather ugly, and means to rely on an internal implementation detail of GByteArray. Instead, add a cleanup macro for GByteArray.
This commit is contained in:
parent
fcf254c03a
commit
f15d82bc91
1 changed files with 3 additions and 0 deletions
|
|
@ -260,6 +260,9 @@ NM_AUTO_DEFINE_FCN_STRUCT (GValue, _nm_auto_unset_gvalue, g_value_unset)
|
|||
NM_AUTO_DEFINE_FCN_VOID0 (void *, _nm_auto_unref_gtypeclass, g_type_class_unref)
|
||||
#define nm_auto_unref_gtypeclass nm_auto(_nm_auto_unref_gtypeclass)
|
||||
|
||||
NM_AUTO_DEFINE_FCN0 (GByteArray *, _nm_auto_unref_bytearray, g_byte_array_unref)
|
||||
#define nm_auto_unref_bytearray nm_auto(_nm_auto_unref_bytearray)
|
||||
|
||||
static inline void
|
||||
_nm_auto_free_gstring (GString **str)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue