mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 15:20:08 +01:00
shared/nm-glib: add compat implementation for g_autofree
Eventually, we should replace our uses of libgsystem's gsystem-local-alloc.h by glib's g_auto*. As a first tiny step, add a compat implementation for g_autofree, so that we could at least go ahead and use it instead of gs_free. https://bugzilla.gnome.org/show_bug.cgi?id=794294
This commit is contained in:
parent
ff8e563365
commit
b2edcdc939
1 changed files with 8 additions and 0 deletions
|
|
@ -114,4 +114,12 @@ _nm_g_strv_contains (const gchar * const *strv,
|
|||
#define g_object_ref_sink(Obj) ((typeof(Obj)) g_object_ref_sink (Obj))
|
||||
#endif
|
||||
|
||||
#ifndef g_autofree
|
||||
/* we still don't rely on recent glib to provide g_autofree. Hence, we continue
|
||||
* to use our gs_* free macros that we took from libgsystem.
|
||||
*
|
||||
* To ease migration towards g_auto*, add a compat define for g_autofree. */
|
||||
#define g_autofree gs_free
|
||||
#endif
|
||||
|
||||
#endif /* __NM_GLIB_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue