shared: propagate type for g_object_ref()

See related bug https://bugzilla.gnome.org/show_bug.cgi?id=790697

(cherry picked from commit 7ca601d529)
This commit is contained in:
Thomas Haller 2017-12-06 10:04:50 +01:00
parent ceeeb51e1d
commit 85b1c11b8f
2 changed files with 6 additions and 0 deletions

View file

@ -481,4 +481,9 @@ _nm_g_variant_new_printf (const char *format_string, ...)
})
#endif
#if !GLIB_CHECK_VERSION (2, 56, 0)
#define g_object_ref(Obj) ((typeof(Obj)) g_object_ref (Obj))
#define g_object_ref_sink(Obj) ((typeof(Obj)) g_object_ref_sink (Obj))
#endif
#endif /* __NM_GLIB_H__ */

View file

@ -697,6 +697,7 @@ nm_g_object_ref (gpointer obj)
g_object_ref (obj);
return obj;
}
#define nm_g_object_ref(obj) ((typeof (obj)) nm_g_object_ref (obj))
static inline void
nm_g_object_unref (gpointer obj)