Re: bonobo_object_ref
- From: Maciej Stachowiak <mjs eazel com>
- To: Ettore Perazzoli <ettore helixcode com>
- Cc: Mathieu Lacage <mathieu eazel com>,Michael Meeks <mmeeks gnu org>, gnome-components-list gnome org
- Subject: Re: bonobo_object_ref
- Date: 05 Aug 2000 02:49:25 -0700
Ettore Perazzoli <ettore@helixcode.com> writes:
> > I really hate code which does this:
> >
> > do_something (bonobo_object_ref (obj));
>
> This is bad indeed, but it does not happen often.
>
> What happens all the time is that you want to save the value of the
> pointer somewhere, and at the same time add a reference to it (as you
> correctly need to do). So the case we are attacking here is:
>
> var = obj;
> bonobo_object_ref (obj);
>
> which becomes
>
> var = bonobo_object_ref (obj);
>
> The latter is definitely clearer.
>
I do not think this is a lot clearer. If the point is only saving
lines, you can already do
bonobo_object_ref (var = obj);
of course this os ugly as hell.
- Maciej
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]