Re: GNOME CVS: gtk+ owen



Owen Taylor <otaylor@redhat.com> writes:

> Tim Janik <timj@gtk.org> writes:
> 
> > > Log message:
> > > Thu Aug 13 16:47:44 1998  Owen Taylor  <otaylor@redhat.com>
> > > 
> > > * Changed GtkSignalFunc back to () from (void). (again!)
> > 
> > ok owen, i know you got a good reason to revert that again,
> > but could you please elaborate on that?
> > i've already dropped a few GTK_SIGNAL_FUNC() macros in some places,
> > and need to go through gtk's and gle's code again to fix that up.
> > so i'd like to know why we can't go for the () typedef.
> > also, this is used in the item factory as well, and gimp probably
> > needs a lot of fixes to the menu arrays to work with the (void)
> > prototype, so i'm more than curious to know why (void) is needed.

Tim, I'm not quite following you here. Didn't you invert () and (void) 
above ? :-)
 
> But "change foo back to y from x" would mean that it ended up as
> "y". So I was intervening to keep things the way you want them.

Indeed.
 
> (I don't think we should get into the habit of dropping GTK_SIGNAL_FUNC()
>  and depending on () - that practice is deprecated in the forthcoming
>  C9X standard, but since we've made it (), I wanted to keep that
>  way for now!)

However, this causes a curious but very annoying problem with Gtk--,
as Mirko Streckenbach found out :

If GtkSignalFunc is (), and Gtk-- is compiled with -pedantic, then
whatever code you want to link to Gtk-- will also have to be compiled
with -pedantic, or you get link errors.

This is somehow annoying, so unless you really can't have
GtkSignalFunc as (void), in which case we'll remove -pedantic from the
Gtk-- makefiles and put a warning somewhere in the docs, it would be
nice if we could have a (void) GtkSignalFunc :-).

TIA:-).

-- 
					Guillaume.
					http://www.worldnet.fr/~glaurent



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