Can I make this change ?

Geert Janssens janssens-geert at telenet.be
Wed Jun 2 12:37:14 EDT 2010


On Wednesday 2 June 2010, Derek Atkins wrote:
> Geert Janssens <janssens-geert at telenet.be> writes:
> > src/gnome/dialog-print-check.c contains this construct:
> > #define ENUM_CHECK_ITEM_TYPE(_) \
> >         _(NONE,) \
> 
> [snip]
> 
> > However I'm not sure what these _() are doing around the parameters. I
> > thought it had to do with translations, but none of these terms is in
> > the po files so that doesn't seem to be it.
> 
> If you look at the #define, it defines ENUM_CHECK_ITEM_TYPE as a macro
> that takes one argument, and the argument is labeled as an underscore.
> So if you call ENUM_CHECK_ITEM_TYPE(foo) it will then result in:
> 
>   foo(NONE,) ...
> 
> > Can anyone explain to me how to interpret this construct ? And even more
> > importantly, if I can add the CHK_ prefix without unintended side-effects
> > ?
> 
> Well, you could just change the construct from _ to something else, like
> "expr".  So you could do something like:
> 
> #define ENUM_CHECK_ITEM_TYPE(expr) \
>     expr(CHK_NONE,) \
>     ...
> 
> HOWEVER, note that this will invalidate all existing check formats!  So
> it's a non-backwards-compatible interface format.
> 
Hmm, that's not very good either...

> Is there some way we can get guile not to #include windows includes?
> 
I tried. But guile 1.8.7 won't build with networking disabled on windows. In 
theory it should, but noone likely tested that the last couple of releases, so 
in practice it definitely won't. And it's the networking stuff that pulls in 
the windows headers.

Geert


More information about the gnucash-devel mailing list