[Geany-devel] sciwrappers.h not compilable ?
enrico.troeger at xxxxx
Sun Aug 16 20:32:51 UTC 2009
On Sun, 16 Aug 2009 22:08:00 +0200, Colomban wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Enrico Tröger wrote:
>> About your initial question abut including sciwrappers.h: the order
>> of header includes is important, I think I already told you that in
>> another thread. First include geany.h, then other Geany includes
>> like document.c or sciwrappers.h, then include pluginmacros.h and
>> geanyfunctions.h. You can't include headers randomly. See other
>> plugins how they do it.
>> All stuff Colomban explained with PLAT_GTK and ScintillaObject
>> declaration is not true as long as you include geany.h. That does
>> all the necessary stuff for you. Check this file to get a clue.
>Just for my self curiousity about including order: why does it is
>I'm a partisan of the "include all you need, but no more" style,
>meaning that if I use a symbol, I have to include what defines it.
>e.g. for sciwrappers.h, I would include glib.h as it uses GLib types
>and define or include something that defines PLAT_GTK. I don't see any
You want to define things in your code again just to not include a
Single header includes are generally more easy and pretty common.
E.g. GTK and GLib do require them since some time.
In case of Geany, the overhead which raises by including a bit more
than strictly necessary is really really small compared what overhead
GTK brings in and so I really don't see any real reason. At least, IMO,
the advantages for maintainers and plugin authors are much bigger.
>reason why not doing this, and I think it is better for each code part
>to be self-sufficient.
>Then the question: why it is done this way?
Because it's way easier to use and less error-prone, see the OP's
mail why we discuss it about in this thread...
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the Devel