Re: g_object_newv patch



James Henstridge <james daa com au> writes:

> On 13 Jun 2001, Owen Taylor wrote:
> 
> > > I have put together a patch to add the g_object_newv function to
> > > libgobject.  The bugzilla bug is:
> > >   http://bugzilla.gnome.org/show_bug.cgi?id=54946
> > > and the patch is at:
> > >   http://bugzilla.gnome.org/showattachment.cgi?attach_id=649
> > >
> > > The patch shouldn't break anything, but it could use some more testing.
> > > It seems okay from my testing so far though.
> > >
> > > The API I used was the one suggested by Owen and Tim:
> > >
> > > typedef struct _GParameter GParameter;
> > > struct _GParameter {
> >
> > This is the one thing I noticed looking through your patch - the
> > { should be on the next line.
> 
> Oops.  I guess I missed this one :(
> 
> >
> > Other than that, the patch looks fine to me; at some point it
> > might be good for someone to go in and optimize out some of the
> > excess mallocs in those functions, but that is hardly GObject's
> > main performance bottleneck at the current time.
> 
> I tried to keep the extra overhead to a minimum, but there is probably
> still room for some optimisation.

My concern reading over that code wasn't new inefficiencies
you introduced but the original code. In fact, by removing
separate calls to g_new() for each GValue collected, you
may well have improved the effiency.

Regards,
                                        Owen 




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