[cairo-commit] 2 commits - src/cairo-surface.c src/Makefile.am

Carl Worth cworth at kemper.freedesktop.org
Mon Jun 12 09:53:35 PDT 2006


 src/Makefile.am     |    4 ++--
 src/cairo-surface.c |    7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
diff-tree 0e30fc44363435c52c762fa8a353de43fe087822 (from 7015cc0b90f99898852ca276368854f9465f4c82)
Author: Carl Worth <cworth at cworth.org>
Date:   Mon Jun 12 08:45:58 2006 -0700

    Add aliases for deprecated cairo_{pdf,ps,svg}_surface_set_dpi
    
    The aliases should allow binaries with the old symbols to continue to run.
    
    Meanwhile, the macros in cairo.h prevent any code from being compiled without
    using the new, future-proof function names.
    
    This is a temporary, transition strategy and the aliases will be dropped
    before the next major release.

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 5c0e69b..3218607 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -742,6 +742,13 @@ cairo_surface_set_fallback_resolution (c
     surface->x_fallback_resolution = x_pixels_per_inch;
     surface->y_fallback_resolution = y_pixels_per_inch;
 }
+/* XXX: Add symbols for old, deprecated names to eas GTK+ migration
+ * pain. This is a transition strategy for prior to 1.2. These
+ * aliases should be dropped before the major release.
+ */
+CAIRO_FUNCTION_ALIAS(cairo_pdf_surface_set_dpi, cairo_surface_set_fallback_resolution);
+CAIRO_FUNCTION_ALIAS(cairo_ps_surface_set_dpi, cairo_surface_set_fallback_resolution);
+CAIRO_FUNCTION_ALIAS(cairo_svg_surface_set_dpi, cairo_surface_set_fallback_resolution);
 
 cairo_bool_t
 _cairo_surface_has_device_transform (cairo_surface_t *surface)
diff-tree 7015cc0b90f99898852ca276368854f9465f4c82 (from 9d3443e86ab32711d332b1474bc2fe23f9796723)
Author: Carl Worth <cworth at cworth.org>
Date:   Mon Jun 12 08:18:09 2006 -0700

    Add cairo-ps-test.h and cairo-svg-test.h to Makefile.am

diff --git a/src/Makefile.am b/src/Makefile.am
index 06bce46..2968228 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,7 @@
 
 if CAIRO_HAS_PS_SURFACE
 libcairo_ps_headers = cairo-ps.h
-libcairo_ps_sources = cairo-ps-surface.c cairo-scaled-font-subsets.c cairo-scaled-font-subsets-private.h
+libcairo_ps_sources = cairo-ps-surface.c cairo-ps-test.h cairo-scaled-font-subsets.c cairo-scaled-font-subsets-private.h
 libcairo_font_subset_sources = cairo-font-subset.c cairo-font-subset-private.h
 endif
 
@@ -17,7 +17,7 @@ endif
 
 if CAIRO_HAS_SVG_SURFACE
 libcairo_svg_headers = cairo-svg.h
-libcairo_svg_sources = cairo-svg-surface.c
+libcairo_svg_sources = cairo-svg-surface.c cairo-svg-test.h
 endif
 
 if CAIRO_HAS_TEST_SURFACES


More information about the cairo-commit mailing list