On 12/08/2017 03:26 AM, Philip Withnall wrote:
child_type = CHILD_TYPE (g_object_ref (parent_type));
Or my personal preference:
g_object_ref (CHILD_TYPE (parent_type))
I was skeptical that this would catch many issues, but it actually
caught a copy pasta for me a couple of days ago with something like:
a->foo = g_object_ref (baz);
a->bar = g_object_ref (baz);
when i changed foo to bar and forgot to modify baz.
So +1 already.
-- Christian
_______________________________________________
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list