glib.h: defining functions in header file



glib.h defines several functions (if one is not using gcc):
g_error
g_message
g_warning

In my opinion, this is bad programming practice. One problem I have run
into because of this is that I would like to use the macros defined in
glib.h and glibconfig.h without linking with glib. However, Since these
functions call g_logv, I must use a swilly workaround to avoid having to
link with glib.

One could argue that linking with glib is not really a big deal, but I
still think that this is bad programming practice.

I see no reason not to put these functions in the glib shared object,
insted of in the header file.

Your thoughts?

--matt



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