[cairo-commit] src/cairo-xcb-surface-render.c src/cairo-xlib-render-compositor.c src/cairo-xlib-surface-shm.c
Uli Schlachter
psychon at kemper.freedesktop.org
Sat Nov 16 10:10:58 PST 2013
src/cairo-xcb-surface-render.c | 2 +-
src/cairo-xlib-render-compositor.c | 2 +-
src/cairo-xlib-surface-shm.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 31eff5c6eb57ad379689748fd8c60a5ffe0ba481
Author: Uli Schlachter <psychon at znc.in>
Date: Sat Nov 16 19:05:35 2013 +0100
Correct usage of CAIRO_STACK_ARRAY_LENGTH
This macro wants the array type as its argument and calls sizeof() on it
internally.
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 99efe87..9625953 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -1350,7 +1350,7 @@ _render_fill_boxes (void *abstract_dst,
cairo_boxes_t *boxes)
{
cairo_xcb_surface_t *dst = abstract_dst;
- xcb_rectangle_t stack_xrects[CAIRO_STACK_ARRAY_LENGTH (sizeof (xcb_rectangle_t))];
+ xcb_rectangle_t stack_xrects[CAIRO_STACK_ARRAY_LENGTH (xcb_rectangle_t)];
xcb_rectangle_t *xrects = stack_xrects;
xcb_render_color_t render_color;
int render_op = _render_operator (op);
diff --git a/src/cairo-xlib-render-compositor.c b/src/cairo-xlib-render-compositor.c
index 68e7ce5..e90df09 100644
--- a/src/cairo-xlib-render-compositor.c
+++ b/src/cairo-xlib-render-compositor.c
@@ -100,7 +100,7 @@ set_clip_region (void *_surface,
_cairo_xlib_surface_ensure_picture (surface);
if (region != NULL) {
- XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (sizeof (XRectangle))];
+ XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)];
XRectangle *rects = stack_rects;
int n_rects, i;
diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
index fa7d3eb..84b46d8 100644
--- a/src/cairo-xlib-surface-shm.c
+++ b/src/cairo-xlib-surface-shm.c
@@ -893,7 +893,7 @@ _cairo_xlib_surface_update_shm (cairo_xlib_surface_t *surface)
}
if (damage->region) {
- XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (sizeof (XRectangle))];
+ XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)];
XRectangle *rects = stack_rects;
cairo_rectangle_int_t r;
int n_rects, i;
@@ -1081,7 +1081,7 @@ _cairo_xlib_surface_put_shm (cairo_xlib_surface_t *surface)
TRACE ((stderr, "%s: flushing damage x %d\n", __FUNCTION__,
damage->region ? cairo_region_num_rectangles (damage->region) : 0));
if (damage->status == CAIRO_STATUS_SUCCESS && damage->region) {
- XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (sizeof (XRectangle))];
+ XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)];
XRectangle *rects = stack_rects;
cairo_rectangle_int_t r;
int n_rects, i;
More information about the cairo-commit
mailing list