Re: type_info macro generation ...
- From: Owen Taylor <otaylor redhat com>
- To: Michael Meeks <michael ximian com>
- Cc: Tim Janik <timj gtk org>, Gtk Hackers <gtk-devel-list gnome org>
- Subject: Re: type_info macro generation ...
- Date: Fri, 19 Sep 2003 09:34:12 -0400
On Fri, 2003-09-19 at 09:14, Michael Meeks wrote:
> Hi Owen,
>
> Just poking at the GTypeInfo stuff, and I appreciate how controversial
> eg. bonobo's "DO_TYPE_EVERYTHING" type macros are (pwrt. interfaces etc.
> etc.).
>
> It struck me that if instead of having to do:
>
> static const GTypeInfo foo_info = {
> sizeof(FooClass), NULL, NULL, foo_class_init, NULL, NULL,
> sizeof(Foo), 0, foo_init, NULL
> };
>
> or somesuch; perhaps a significant size saving could be had from a
> macro something like:
>
> G_TYPEINFO_DECL(foo, Foo);
>
> or somesuch ? - that could shrink the get_type by a good number of
> lines for the very common case.
As far as I know, there's nothing at all controversial about the libgsf
style of macro that defines the entire get_type() function. That is,
everybody who has commented on it thinks it's a good idea. Still haven't
heard from Tim.
The BONOBO_BOILERPLATE style with the prototypes for class_init and init
and the class_init trampoline to set the parent type, I think *is*
to comprehensive. Plus, it doesn't do interfaces.
But I like the libgsf style a lot.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]