[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.
This commit is contained in:
Behdad Esfahbod 2007-08-30 18:45:26 -04:00
parent e7324454a0
commit dd406b1ffa

View file

@ -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*)) \