diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2007-05-01 19:24:26 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2007-05-01 19:24:26 -0400 |
commit | e87a25dc7c73a44b0cdfc4ef368736e7f77fb522 (patch) | |
tree | 6995c20db0e631d47c7942a576f4f2afe6e7dd4a /src/cairo-mutex.c | |
parent | 1a33e44aa5d73f568c4164c41f9595964e9f1bbb (diff) |
[cairo-mutex] Fix usage of CAIRO_MUTEX_DECLARE()
Previously cairo-mutex.c was abusing cairo-mutex-private.h by
defining CAIRO_MUTEX_DECLARE before including it, and
cairo-mutex-private.h was simply not overriding any available
CAIRO_MUTEX_DECLARE. This is not the way it should be.
cairo-mutex.c should instead define CAIRO_MUTEX_DECLARE and
include cairo-mutex-list-private.h for itself.
Diffstat (limited to 'src/cairo-mutex.c')
-rw-r--r-- | src/cairo-mutex.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cairo-mutex.c b/src/cairo-mutex.c index df21af39..32564418 100644 --- a/src/cairo-mutex.c +++ b/src/cairo-mutex.c @@ -31,11 +31,12 @@ * Mathias Hasselmann <mathias.hasselmann@gmx.de> */ -#define CAIRO_MUTEX_DECLARE(mutex) \ - cairo_mutex_t mutex = CAIRO_MUTEX_NIL_INITIALIZER; - #include "cairoint.h" +#define CAIRO_MUTEX_DECLARE(mutex) cairo_mutex_t mutex = CAIRO_MUTEX_NIL_INITIALIZER +#include "cairo-mutex-list-private.h" +#undef CAIRO_MUTEX_DECLARE + #if CAIRO_MUTEX_USE_GENERIC_INITIALIZATION cairo_bool_t _cairo_mutex_initialized = FALSE; @@ -47,7 +48,7 @@ void _cairo_mutex_initialize (void) _cairo_mutex_initialized = TRUE; -#define CAIRO_MUTEX_DECLARE(mutex) CAIRO_MUTEX_INIT (mutex); +#define CAIRO_MUTEX_DECLARE(mutex) CAIRO_MUTEX_INIT (mutex) #include "cairo-mutex-list-private.h" #undef CAIRO_MUTEX_DECLARE } |