Re: glib-extra.h G_DEFINE_DATA_TYPE issue

On Mon, 22 May 2006, Stefan Westerfeld wrote:

[BB] stefan lotrien:~/src/beast/sfi$ make sfistore.lo

../sfi/glib-extra.h:273:1: warning: "G_IMPLEMENT_INTERFACE" redefined

/usr/local/gnome/include/glib-2.0/gobject/gtype.h:350:1: warning: this is the location of the previous definition

Since both, the compiler and gobject-2.0 are bleeding edge, I tried
downgrading both, and here are the results:

                gcc-4.1        gcc-4.2-snapshot
glib-2.10.2      no warnings    no warnings
glib-2.11.2      warnings       warnings

So its basically glib-2.11.2 and glib-extra.h which don't work together
without warnings.

Now, there is code to disable definition of all these macros in
glib-extra.h, which reads:

#ifndef G_DEFINE_DATA_TYPE      // GTKFIX: add this to glib

Well, what could be done is using #ifndef G_IMPLEMENT_INTERFACE around
G_IMPLEMENT_INTERFACE then, but as far as I understood you, you'll
probably want to understand why it happens at all.

glib-extra.h defines G_IMPLEMENT_INTERFACE the way glib-2.10.2 does it,
so you don't get a compiler warning.
glib-2.11.2 changes the definition so you're now getting a warning because
glib-extra.h tries to redefine it to something different.

fixed in CVS.

  Cu... Stefan


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