[cairo-commit] cairo/src cairo-font.c,1.74,1.75

Carl Worth commit at pdx.freedesktop.org
Tue Aug 23 14:51:59 PDT 2005


Committed by: cworth

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

Modified Files:
	cairo-font.c 
Log Message:

2005-08-23  Carl Worth  <cworth at cworth.org>

        * src/cairo-font.c: (cairo_font_face_reference),
        (cairo_scaled_font_reference): Remove assert statements that
        violate two intentional instances of ref_count == 0.


Index: cairo-font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-font.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- cairo-font.c	23 Aug 2005 21:04:28 -0000	1.74
+++ cairo-font.c	23 Aug 2005 21:51:57 -0000	1.75
@@ -85,7 +85,9 @@
     if (font_face->ref_count == (unsigned int)-1)
 	return font_face;
 
-    assert (font_face->ref_count > 0);
+    /* We would normally assert (font_face->ref_count >0) here but we
+     * can't get away with that due to the zombie case as documented
+     * in _cairo_ft_font_face_destroy. */
 
     font_face->ref_count++;
 
@@ -764,7 +766,9 @@
     if (scaled_font->ref_count == (unsigned int)-1)
 	return scaled_font;
 
-    assert (scaled_font->ref_count > 0);
+    /* We would normally assert (scaled_font->ref_count > 0) here, but
+     * we are using ref_count == 0 as a legitimate case for the
+     * holdovers array. See below. */
 
     /* If the original reference count is 0, then this font must have
      * been found in font_map->holdovers, (which means this caching is



More information about the cairo-commit mailing list