does gmm-proc have a way of dealing with preprocessor #defines?



Hi,
I'm messing around with cluttermm, which hasn't seen a lot of attention for some time.  I think the last time the .hg files were updated was just before the 1.0 release in 2009, and the last git commit was about a year ago.

I've managed to build it with jhbuild, but there's been a lot of work done in cluttermm since 2009, and there's some wrapping required to get it up to speed.  I'm working my way through that, but have run into the following problem:  when running enum.pl to generate the enums, ClutterPathNodeType is causing grief.  Here's the C declaration in clutter-enums.h (emphasis mine):

#define CLUTTER_PATH_RELATIVE           (32)

/**
 * ClutterPathNodeType:
 * @CLUTTER_PATH_MOVE_TO: jump to the given position
 * @CLUTTER_PATH_LINE_TO: create a line from the last node to the
 *   given position
 * @CLUTTER_PATH_CURVE_TO: bezier curve using the last position and
 *   three control points.
 * @CLUTTER_PATH_CLOSE: create a line from the last node to the last
 *   %CLUTTER_PATH_MOVE_TO node.
 * @CLUTTER_PATH_REL_MOVE_TO: same as %CLUTTER_PATH_MOVE_TO but with
 *   coordinates relative to the last node.
 * @CLUTTER_PATH_REL_LINE_TO: same as %CLUTTER_PATH_LINE_TO but with
 *   coordinates relative to the last node.
 * @CLUTTER_PATH_REL_CURVE_TO: same as %CLUTTER_PATH_CURVE_TO but with
 *   coordinates relative to the last node.
 *
 * Types of nodes in a #ClutterPath.
 *
 * Since: 1.0
 */
typedef enum {
  CLUTTER_PATH_MOVE_TO      = 0,
  CLUTTER_PATH_LINE_TO      = 1,
  CLUTTER_PATH_CURVE_TO     = 2,
  CLUTTER_PATH_CLOSE        = 3,

  CLUTTER_PATH_REL_MOVE_TO  = CLUTTER_PATH_MOVE_TO | CLUTTER_PATH_RELATIVE,
  CLUTTER_PATH_REL_LINE_TO  = CLUTTER_PATH_LINE_TO | CLUTTER_PATH_RELATIVE,
  CLUTTER_PATH_REL_CURVE_TO = CLUTTER_PATH_CURVE_TO | CLUTTER_PATH_RELATIVE
} ClutterPathNodeType;
and so running enum.pl on it results in
WARNING: CLUTTER_PATH_RELATIVE value of CLUTTER_PATH_REL_LINE_TO element in 'ClutterPathNodeType' enum is an unknown token.
It probably is ...
I'm guessing it's the preprocessor define that's causing the problem.  Is there a simple way to get gmmproc to read this appropriately, or should I just redefine the whole enum in one of the .hg files?

Ian.



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