Bug 1380 - Return booleans from CLUTTER_ACTOR_IS_* macros
authorEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 14 Jan 2009 18:14:46 +0000 (18:14 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 14 Jan 2009 18:18:20 +0000 (18:18 +0000)
commit22183c7a8f092f0792c6f805d4b313651c999730
tree5141a572aeb4f20e03acb2391621f4f9abdebf47
parent41386a5f72b389956c363fa06669f6d554d73b53
Bug 1380 - Return booleans from CLUTTER_ACTOR_IS_* macros

If you try to use the CLUTTER_ACTOR_IS_* macros defined in ClutterActor
like this:

  typedef struct { unsigned int reactive : 1; } foo_t;

  foo_t f; f.reactive = CLUTTER_ACTOR_IS_REACTIVE (actor);

It will blow up because while the macros evaluate to 0 they can also
evaluate to non-zero values. Since most of the boolean flags in
Clutter and Clutter-based code are going to be stored like in the
example above, we should change the macros and let them evaluate
stricly either to 0 or to 1.
clutter/clutter-actor.h