Re: BonoboUIComponent missing preconditions



Hi Dude,

On 2 Jul 2001, Ettore Perazzoli wrote:
> Sigh.  Any reason not to commit the attached patch?  (I hope I got all
> the checks right.)

        Please remove the redundant:

**      g_return_if_fail (a != NULL);        **
        g_return_if_fail (BONOBO_IS_FOO (a));

        since that check is integrated, and we want to keep line count
low and readable.

        Secondly, I removed some of the preconditions - of the type

        g_return_if_fail (BONOBO_IS_UI_COMPONENT (uic));

        on some of the methods, since that's a slow check - and some
of those are called scads of times - in this case it's nice to have a

        g_return_if_fail (uic != NULL);

	This is especialy true of cases where the method just chains
to a CLASS->doit () type method - best not to do 4 g_type_is_a's per
method invocation.

        Also, the way the patch reads it's somewhat hard to say which
routines the change is for :-) so I think only _set_prop, and _set are
called a whole lot.

        Anyway, please do fix and commit, [ and can you commit to
libbonoboui too ? ].

        Thanks,

                Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]