diff --git a/ChangeLog b/ChangeLog index fef21d943..5fcb7592c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-07-20 Carl Worth + + reviewed by: keithp + + * src/cairo.h (CAIRO_CONTENT_VALID): Fix macro to not consider + CAIRO_FORMAT_ARGB32 (==0) as a valid cairo_content_t. + 2005-07-20 Keith Packard reviewed by: otaylor diff --git a/src/cairo.h b/src/cairo.h index 41ae83ce7..d1bdc36bb 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -907,9 +907,11 @@ typedef enum _cairo_content { CAIRO_CONTENT_COLOR_ALPHA = 0x3000 } cairo_content_t; -#define CAIRO_CONTENT_VALID(content) (((content) & ~(CAIRO_CONTENT_COLOR | \ - CAIRO_CONTENT_ALPHA | \ - CAIRO_CONTENT_COLOR_ALPHA)) == 0) +#define CAIRO_CONTENT_VALID(content) ((content) && \ + (((content) & ~(CAIRO_CONTENT_COLOR | \ + CAIRO_CONTENT_ALPHA | \ + CAIRO_CONTENT_COLOR_ALPHA))\ + == 0)) cairo_surface_t * cairo_surface_create_similar (cairo_surface_t *other,