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:
@@ -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__ */
|
||||
|
Reference in New Issue
Block a user