Re: g_object_ref() now propagates types
- From: Christian Hergert <christian hergert me>
- To: desktop-devel-list gnome org
- Subject: Re: g_object_ref() now propagates types
- Date: Fri, 8 Dec 2017 03:36:21 -0800
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]