mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 13:30:20 +01:00
shared/glib: unconditionally redefine g_object_ref()/g_object_ref_sink() as typesafe macro
This commit is contained in:
parent
02ac5693d3
commit
03b8eb124e
1 changed files with 10 additions and 2 deletions
|
|
@ -522,10 +522,18 @@ _nm_g_variant_new_printf (const char *format_string, ...)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#if !GLIB_CHECK_VERSION (2, 56, 0)
|
||||
/* Recent glib also casts the results to typeof(Obj), but only if
|
||||
*
|
||||
* ( defined(g_has_typeof) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56 )
|
||||
*
|
||||
* Since we build NetworkManager with older GLIB_VERSION_MAX_ALLOWED, it's
|
||||
* not taking effect.
|
||||
*
|
||||
* Override this. */
|
||||
#undef g_object_ref
|
||||
#undef g_object_ref_sink
|
||||
#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
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue