[cairo-commit] cairo/src cairo.c,1.104,1.105

Carl Worth commit at pdx.freedesktop.org
Wed Jun 15 10:46:51 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv19585/src

Modified Files:
	cairo.c 
Log Message:

        * src/cairo.c: (_cairo_error): Add _cairo_error so we have a
        single function which all errors can pass through. This allows the
        user to set a breakpoint on error and will allow us to augment
        error handling later as necessary.

        * src/cairo.c: (cairo_create), (cairo_reference),
        (cairo_destroy), (cairo_save), (cairo_restore),
        (cairo_set_operator), (cairo_set_source_rgb),
        (cairo_set_source_rgba), (cairo_set_source_surface),
        (cairo_set_source), (cairo_get_source), (cairo_set_tolerance),
        (cairo_set_fill_rule), (cairo_set_line_width),
        (cairo_set_line_cap), (cairo_set_line_join), (cairo_set_dash),
        (cairo_set_miter_limit), (cairo_translate), (cairo_scale),
        (cairo_rotate), (cairo_transform), (cairo_set_matrix),
        (cairo_identity_matrix), (cairo_user_to_device),
        (cairo_user_to_device_distance), (cairo_device_to_user),
        (cairo_device_to_user_distance), (cairo_new_path), (cairo_move_to),
        (cairo_line_to), (cairo_curve_to), (cairo_arc),
        (cairo_arc_negative), (cairo_rel_move_to), (cairo_rel_line_to),
        (cairo_rel_curve_to), (cairo_rectangle), (cairo_close_path),
        (cairo_paint), (cairo_paint_with_alpha), (cairo_mask),
        (cairo_mask_surface), (cairo_stroke_preserve),
        (cairo_fill_preserve), (cairo_copy_page), (cairo_show_page),
        (cairo_in_stroke), (cairo_in_fill), (cairo_stroke_extents),
        (cairo_fill_extents), (cairo_clip_preserve), (cairo_reset_clip),
        (cairo_select_font_face), (cairo_get_font_face),
        (cairo_font_extents), (cairo_set_font_face), (cairo_set_font_size),
        (cairo_set_font_matrix), (cairo_get_font_matrix),
        (cairo_text_extents), (cairo_glyph_extents), (cairo_show_text),
        (cairo_show_glyphs), (cairo_text_path), (cairo_glyph_path),
        (cairo_get_operator), (cairo_get_tolerance),
        (cairo_get_current_point), (cairo_get_fill_rule),
        (cairo_get_line_width), (cairo_get_line_cap),
        (cairo_get_line_join), (cairo_get_miter_limit), (cairo_get_matrix),
        (cairo_get_target), (cairo_copy_path), (cairo_copy_path_flat),
        (cairo_append_path), (cairo_status): Make all assignements to
        cr->status go through the new _cairo_error function. Remove
        CAIRO_CHECK_SANITY macro.


Index: cairo.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -d -r1.104 -r1.105
--- cairo.c	13 Jun 2005 23:53:52 -0000	1.104
+++ cairo.c	15 Jun 2005 17:46:49 -0000	1.105
@@ -57,34 +57,37 @@
 };
 
 #include <assert.h>
-#ifdef NDEBUG
-#define CAIRO_CHECK_SANITY(cr) 
-#else
-static int 
-cairo_sane_state (cairo_t *cr)
-{    
-    if (cr == NULL)
-	return 0;
[...1530 lines suppressed...]
     if (path->status) {
-	cr->status = path->status;
+	_cairo_error (cr, path->status);
 	return;
     }
 
     cr->status = _cairo_path_data_append_to_context (path, cr);
-
-    CAIRO_CHECK_SANITY (cr);
+    if (cr->status)
+	_cairo_error (cr, cr->status);
 }
 
 cairo_status_t
 cairo_status (cairo_t *cr)
 {
-    CAIRO_CHECK_SANITY (cr);
     return cr->status;
 }
 




More information about the cairo-commit mailing list