Re: gmarshal.h fix
- From: Tim Janik <timj gtk org>
- To: Darin Adler <darin bentspoon com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: gmarshal.h fix
- Date: Sat, 25 Aug 2001 15:20:56 +0200 (CEST)
On Mon, 20 Aug 2001, Darin Adler wrote:
> On Monday, August 20, 2001, at 05:25  AM, Tim Janik wrote:
> 
> > On Sat, 18 Aug 2001, Darin Adler wrote:
> >
> >> I'd like to change the Makefile.am in gobject to put an "#include
> >> <glib/gtypes.h>" at the top of gmarshal.h, so it's safe to include it
> >> first. Is that OK?
> >
> > no, you should never include gobject/gmarshal.h directly, if you
> > need just the marshallers, put #include <gobject/gsignal.h> into
> > your code, but even that shouldn't be necessary as
> > #include <glib-object.h> is required anywhere you use
> > types/objects/signals/marshaller so you should have them right away.
> 
> The specific case I'm thinking about is in generated marshal .h files. 
> These generated files include <gobject/gmarshal.h> (I'm not sure why), but 
> they don't include anything else. So they don't have enough includes to 
> compile as-is -- you always have to include gtypes.h explicitly first. 
> Perhaps I should add the "#include <glib/gtypes.h>" to the top of files 
> generated by glib-gmarshal, before the "#include <gobject/gmarshal.h>". 
> What do you think of that?
> 
> I am not happy with header files that you can't include without first 
> including other .h files. Such headers seem sloppy and inconvenient to me.
> 
> Perhaps the problem is that we have different philosophies about header 
> files.
i don't think so ;) you have a point there.
the reason for generated marshaller headers to include gobject/gmarshal.h
is that it might simpy do:
#define your_marshal_VOID__BOOLEAN       g_cclosure_marshal_VOID__BOOLEAN
it should probably include at least gobject/gsignal.h for the reasons
you mention, i'll fix this up at some point (i still have a couple other
things to fix in glib-genmarshal and will handle that on the way).
> 
>      -- Darin
> 
---
ciaoTJ
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]