Can I make this change ?

Derek Atkins warlord at MIT.EDU
Wed Jun 2 10:51:51 EDT 2010


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.

Is there some way we can get guile not to #include windows includes?

> Geert

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list