diff options
author | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2010-09-02 14:51:30 +0100 |
---|---|---|
committer | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2010-09-02 14:51:30 +0100 |
commit | a9e055ff481303428cd9684dca826bc3f5d868c5 (patch) | |
tree | 9ea4a3927429a6717394e32252553c936b589df2 /src/cairo-freelist-private.h | |
parent | f5632d641c44a143386ca3b413e90ed3b1a85f89 (diff) | |
download | cairo-a9e055ff481303428cd9684dca826bc3f5d868c5.tar.gz |
freelist: Separate freelist inlines from the datatype in headers.
The cairo-freelist-private.h header has a number of static inline
functions which call hidden functions in libcairo. This poses
a problem on Solaris where the native compiler compiles inline
functions whether they are used or not, thereby adding the
link time requirements on hidden functions from whatever code
that includes cairo-freelist-private.h. Unfortunately the
boilerplate code includes cairo-private headers and indirectly
the freelist header, so linking the boilerplate helper library
fails on Solaris.
This patch separates the structure definitions from the function
prototypes and static inlines in cairo-freelist-private.h by moving
the datatypes to a new cairo-freelist-type-private.h.
Diffstat (limited to 'src/cairo-freelist-private.h')
-rw-r--r-- | src/cairo-freelist-private.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/cairo-freelist-private.h b/src/cairo-freelist-private.h index 47ed23297..703181b56 100644 --- a/src/cairo-freelist-private.h +++ b/src/cairo-freelist-private.h @@ -24,6 +24,7 @@ #include "cairo-types-private.h" #include "cairo-compiler-private.h" +#include "cairo-freelist-type-private.h" /* for stand-alone compilation*/ #ifndef VG @@ -34,33 +35,6 @@ #define NULL (void *) 0 #endif -typedef struct _cairo_freelist_node cairo_freelist_node_t; -struct _cairo_freelist_node { - cairo_freelist_node_t *next; -}; - -typedef struct _cairo_freelist { - cairo_freelist_node_t *first_free_node; - unsigned nodesize; -} cairo_freelist_t; - -typedef struct _cairo_freelist_pool cairo_freelist_pool_t; -struct _cairo_freelist_pool { - cairo_freelist_pool_t *next; - unsigned size, rem; - uint8_t *data; -}; - -typedef struct _cairo_freepool { - cairo_freelist_node_t *first_free_node; - cairo_freelist_pool_t *pools; - cairo_freelist_pool_t *freepools; - unsigned nodesize; - cairo_freelist_pool_t embedded_pool; - uint8_t embedded_data[1000]; -} cairo_freepool_t; - - /* Initialise a freelist that will be responsible for allocating * nodes of size nodesize. */ cairo_private void |