Re: g_warning/g_error/g_message



Dan Winship <danw ximian com> writes:

> If you're using a non-GNU, non-C9X compiler, g_warning, g_error, and
> g_message get defined as static functions in every single file that
> #includes glib.h. Bug? (They used to be "static inline" but that got
> changed a while back because apparently it broke something.) 

===
Wed Jan 13 11:27:24 PST 1999 Manish Singh <yosh gimp org>

	* glib.h: don't use inline for !__GNUC__ case with g_warning,
	g_error, and g_message wrappers since some compilers throw
	away arguments in this case
===

I don't think I was in on the discussion of this, and it doesn't
seem to be archived on any of the GTK+ mailing lists, so
I don't know the details.

But inline isn't a standard C thing anyways.

> Shouldn't there just be prototypes in glib.h and definitions in
> gmessages.c?

The definitions of g_warning() include the value of G_LOG_DOMAIN,
so, no that doesn't work.

The definition-in-every-file thing for sufficiently crappy compilers
was certainly known about when we went with this scheme, and
we decided it was acceptable.

Regards,
                                        Owen




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