[cairo-commit] 3 commits - boilerplate/cairo-boilerplate.c boilerplate/cairo-boilerplate-xcb.c src/cairo-fixed-private.h

Uli Schlachter psychon at kemper.freedesktop.org
Fri Mar 22 06:16:22 PDT 2013


 boilerplate/cairo-boilerplate-xcb.c |    4 ++--
 boilerplate/cairo-boilerplate.c     |    2 ++
 src/cairo-fixed-private.h           |    1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 41ef69a98c67a2cb8b64e8ef3bb986d57a0a2437
Author: Uli Schlachter <psychon at znc.in>
Date:   Fri Mar 22 14:14:29 2013 +0100

    Fix "make check" standalone header check
    
    This fixes the following error:
    
    ./cairo-fixed-private.h: In function ‘_slow_segment_intersection’:
    ./cairo-fixed-private.h:374:9: error: ‘FALSE’ undeclared (first use in this function)
    ./cairo-fixed-private.h:374:9: note: each undeclared identifier is reported only once for each function it appears in
    ./cairo-fixed-private.h:386:12: error: ‘TRUE’ undeclared (first use in this function)
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairo-fixed-private.h b/src/cairo-fixed-private.h
index 352ca39..e970c0f 100644
--- a/src/cairo-fixed-private.h
+++ b/src/cairo-fixed-private.h
@@ -40,6 +40,7 @@
 #include "cairo-fixed-type-private.h"
 
 #include "cairo-wideint-private.h"
+#include "cairoint.h"
 
 /* Implementation */
 
commit b7c06fff1f597ba74fa6618766ec297d3a4bf880
Author: Uli Schlachter <psychon at znc.in>
Date:   Fri Mar 22 14:04:44 2013 +0100

    boilerplate: rename xcb-render-0.0 to xcb-render-0_0
    
    The test suite uses dots to separate the backend name from the content type.
    Thus, the backend name must not contain any dots.
    
    The xlib backend already calls its RENDER 0.0 target xlib-render-0_0 for this
    reason. This commit makes the xcb backend match this.
    
    Reported-by: Darxus <darxus at chaosreigns.com>
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/boilerplate/cairo-boilerplate-xcb.c b/boilerplate/cairo-boilerplate-xcb.c
index ffefecb..cc9b422 100644
--- a/boilerplate/cairo-boilerplate-xcb.c
+++ b/boilerplate/cairo-boilerplate-xcb.c
@@ -828,7 +828,7 @@ static const cairo_boilerplate_target_t targets[] = {
 	FALSE, FALSE, FALSE
     },
     {
-	"xcb-render-0.0", "xlib-fallback", NULL, NULL,
+	"xcb-render-0_0", "xlib-fallback", NULL, NULL,
 	CAIRO_SURFACE_TYPE_XCB, CAIRO_CONTENT_COLOR_ALPHA, 1,
 	"cairo_xcb_surface_create_with_xrender_format",
 	_cairo_boilerplate_xcb_create_render_0_0,
@@ -843,7 +843,7 @@ static const cairo_boilerplate_target_t targets[] = {
 	FALSE, FALSE, FALSE
     },
     {
-	"xcb-render-0.0", "xlib-fallback", NULL, NULL,
+	"xcb-render-0_0", "xlib-fallback", NULL, NULL,
 	CAIRO_SURFACE_TYPE_XCB, CAIRO_CONTENT_COLOR, 1,
 	"cairo_xcb_surface_create_with_xrender_format",
 	_cairo_boilerplate_xcb_create_render_0_0,
commit caf50c07e225ee3a3e149234601e7305b1437736
Author: Uli Schlachter <psychon at znc.in>
Date:   Fri Mar 22 13:58:04 2013 +0100

    test: Fix handling of dots in CAIRO_TEST_TARGET
    
    Before this, the following happened:
    
      $ CAIRO_TEST_TARGET=image,xcb-render-0.0 make test
      Cannot find target 'image'.
      Known targets: image, [...]
    
    The reason for this is that _cairo_boilerplate_target_matches_name() doesn't get
    a null-terminated string, but instead has a pointer to the end of the string.
    However, strpbrk() expects a null-terminated argument and thus could return a
    result which points past the end of the input.
    
    This commit fixes exactly this.
    
    Reported-by: Darxus <darxus at chaosreigns.com>
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c
index 41db8b8..674c8d0 100644
--- a/boilerplate/cairo-boilerplate.c
+++ b/boilerplate/cairo-boilerplate.c
@@ -514,6 +514,8 @@ _cairo_boilerplate_target_matches_name (const cairo_boilerplate_target_t *target
     size_t name_len;
     size_t content_len;
 
+    if (content_start >= end)
+	content_start = NULL;
     if (content_start != NULL)
 	end = content_start++;
 


More information about the cairo-commit mailing list