[cairo-commit] src/cairo-path-fixed-private.h

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Aug 30 15:45:59 PDT 2007


 src/cairo-path-fixed-private.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
diff-tree dd406b1ffa411b100950c0156d842e3022e4029d (from e7324454a06e1f090d4e654c9cdcb774f9fb39ab)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Aug 30 18:45:26 2007 -0400

    [cairo-path-fixed] typedef char cairo_path_fixed_op_t
    
    So it consumes one byte only, instead of the previous enum with
    the __attribute__((packed)) that didn't do anything on non-gcc systems.

diff --git a/src/cairo-path-fixed-private.h b/src/cairo-path-fixed-private.h
index 65401f3..95fac7f 100644
--- a/src/cairo-path-fixed-private.h
+++ b/src/cairo-path-fixed-private.h
@@ -41,8 +41,9 @@ typedef enum cairo_path_op {
     CAIRO_PATH_OP_LINE_TO = 1,
     CAIRO_PATH_OP_CURVE_TO = 2,
     CAIRO_PATH_OP_CLOSE_PATH = 3
-} __attribute__ ((packed)) cairo_path_op_t; /* Don't want 32 bits if we can avoid it. */
-/* XXX Shall we just not use char instead of hoping for __attribute__ working? */
+};
+/* we want to make sure a single byte is used for thie enum */
+typedef char cairo_path_op_t;
 
 /* make cairo_path_fixed fit a 512 bytes.  about 50 items */
 #define CAIRO_PATH_BUF_SIZE ((512 - 12 * sizeof (void*)) \


More information about the cairo-commit mailing list