Skip to content
Commit 3fae39a5 authored by Christian Hergert's avatar Christian Hergert 💬 Committed by Philip Withnall
Browse files

gobject: add type propagation to gobject ref API

Currently, g_object_ref() and g_object_ref_sink() return a
gpointer which can mask issues when assigning to fields or
returning from a function.

To help catch these type of programming errors, we can propagate
the type of the parameter through the function call on GCC
using the typeof() C language extension.

This will cause offending code to have a warning, but will
continue to be source and binary compatible.

This is only enabled when GLIB_VERSION_MAX_ALLOWED is 2.56 or greater.

https://bugzilla.gnome.org/show_bug.cgi?id=790697
parent 018b997d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment