[cairo-commit] cairo/src cairo-font.c, 1.56, 1.57 cairo-ft-font.c, 1.79, 1.80 cairo-surface.c, 1.81, 1.82 cairo-win32-font.c, 1.27, 1.28 cairoint.h, 1.170, 1.171

Owen Taylor commit at pdx.freedesktop.org
Wed Jul 27 16:23:14 PDT 2005


Committed by: otaylor

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

Modified Files:
	cairo-font.c cairo-ft-font.c cairo-surface.c 
	cairo-win32-font.c cairoint.h 
Log Message:
2005-07-27  Owen Taylor  <otaylor at redhat.com>

        * src/cairo-win32-font.c (_win32_scaled_font_create):
        * src/cairo-ft-font.c (_ft_scaled_font_create): Go back to
        returning NULL.

        * src/cairoint.h src/cairo-ft-font.c: Stop exporting
        _cairo_scaled_font_nil, since we dont' need it publically
        any more.

        * src/cairo-surface.c (_cairo_surface_reset_clip): return
        surface->status not status. (Fixes warning)


Index: cairo-font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-font.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- cairo-font.c	27 Jul 2005 22:39:35 -0000	1.56
+++ cairo-font.c	27 Jul 2005 23:23:11 -0000	1.57
@@ -421,7 +421,7 @@
 
 /* cairo_scaled_font_t */
 
-const cairo_scaled_font_t _cairo_scaled_font_nil = {
+static const cairo_scaled_font_t _cairo_scaled_font_nil = {
     CAIRO_STATUS_NO_MEMORY,	/* status */
     -1,				/* ref_count */
     { 1., 0., 0., 1., 0, 0},	/* font_matrix */

Index: cairo-ft-font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-ft-font.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- cairo-ft-font.c	27 Jul 2005 22:39:35 -0000	1.79
+++ cairo-ft-font.c	27 Jul 2005 23:23:11 -0000	1.80
@@ -1377,8 +1377,8 @@
     cairo_ft_scaled_font_t *f = NULL;
 
     f = malloc (sizeof(cairo_ft_scaled_font_t));
-    if (f == NULL) 
-	return (cairo_scaled_font_t*) &_cairo_scaled_font_nil;
+    if (f == NULL)
+	return NULL;
 
     f->unscaled = unscaled;
     _cairo_unscaled_font_reference (&unscaled->base);

Index: cairo-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-surface.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- cairo-surface.c	27 Jul 2005 22:39:35 -0000	1.81
+++ cairo-surface.c	27 Jul 2005 23:23:11 -0000	1.82
@@ -1038,7 +1038,7 @@
     cairo_status_t  status;
 
     if (surface->status)
-	return status;
+	return surface->status;
 
     if (surface->finished)
 	return CAIRO_STATUS_SURFACE_FINISHED;

Index: cairo-win32-font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-win32-font.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- cairo-win32-font.c	27 Jul 2005 22:39:35 -0000	1.27
+++ cairo-win32-font.c	27 Jul 2005 23:23:11 -0000	1.28
@@ -223,10 +223,8 @@
     cairo_matrix_t scale;
 
     f = malloc (sizeof(cairo_win32_scaled_font_t));
-    if (f == NULL) {
-	_cairo_error (CAIRO_STATUS_NO_MEMORY);
-	return &_cairo_scaled_font_nil;
-    }
+    if (f == NULL)
+	return NULL;
 
     f->logfont = *logfont;
     f->options = *options;

Index: cairoint.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairoint.h,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -d -r1.170 -r1.171
--- cairoint.h	27 Jul 2005 22:39:35 -0000	1.170
+++ cairoint.h	27 Jul 2005 23:23:11 -0000	1.171
@@ -1311,8 +1311,6 @@
 				cairo_font_slant_t    slant,
 				cairo_font_weight_t   weight);
 
-extern const cairo_scaled_font_t _cairo_scaled_font_nil;
-
 cairo_private void
 _cairo_scaled_font_init (cairo_scaled_font_t 	           *scaled_font, 
 			 const cairo_matrix_t              *font_matrix,




More information about the cairo-commit mailing list