[cairo-commit] rcairo/src rb_cairo.h, 1.22, 1.23 rb_cairo_font_options.c, 1.4, 1.5 rb_cairo_private.c, 1.10, 1.11 rb_cairo_private.h, 1.12, 1.13

Kouhei Sutou commit at pdx.freedesktop.org
Sun Aug 17 00:21:44 PDT 2008


Committed by: kou

Update of /cvs/cairo/rcairo/src
In directory kemper:/tmp/cvs-serv30288/src

Modified Files:
	rb_cairo.h rb_cairo_font_options.c rb_cairo_private.c 
	rb_cairo_private.h 
Log Message:
* src/, test/: add missing version checks.


Index: rb_cairo.h
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- rb_cairo.h	16 Aug 2008 12:52:16 -0000	1.22
+++ rb_cairo.h	17 Aug 2008 07:21:42 -0000	1.23
@@ -199,8 +199,10 @@
 cairo_glyph_t        *rb_cairo_glyph_from_ruby_object        (VALUE obj);
 VALUE                 rb_cairo_glyph_to_ruby_object          (cairo_glyph_t *glyph);
 
+#if CAIRO_CHECK_VERSION(1, 7, 2)
 cairo_text_cluster_t *rb_cairo_text_cluster_from_ruby_object (VALUE obj);
 VALUE                 rb_cairo_text_cluster_to_ruby_object   (cairo_text_cluster_t *cluster);
+#endif
 
 cairo_surface_t      *rb_cairo_surface_from_ruby_object      (VALUE obj);
 VALUE                 rb_cairo_surface_to_ruby_object        (cairo_surface_t *surface);

Index: rb_cairo_font_options.c
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_font_options.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- rb_cairo_font_options.c	13 Aug 2008 12:27:40 -0000	1.4
+++ rb_cairo_font_options.c	17 Aug 2008 07:21:42 -0000	1.5
@@ -160,6 +160,7 @@
   return INT2NUM (cairo_font_options_get_hint_metrics (_SELF (self)));
 }
 
+#if CAIRO_CHECK_VERSION(1, 7, 2)
 static VALUE
 cr_options_set_lcd_filter (VALUE self, VALUE lcd_filter)
 {
@@ -173,6 +174,7 @@
 {
   return INT2NUM (cairo_font_options_get_lcd_filter (_SELF (self)));
 }
+#endif
 
 
 void
@@ -206,10 +208,12 @@
                     cr_options_set_hint_metrics, 1);
   rb_define_method (rb_cCairo_FontOptions, "hint_metrics",
                     cr_options_get_hint_metrics, 0);
+#if CAIRO_CHECK_VERSION(1, 7, 2)
   rb_define_method (rb_cCairo_FontOptions, "set_lcd_filter",
                     cr_options_set_lcd_filter, 1);
   rb_define_method (rb_cCairo_FontOptions, "lcd_filter",
                     cr_options_get_lcd_filter, 0);
+#endif
 
   RB_CAIRO_DEF_SETTERS (rb_cCairo_FontOptions);
 }

Index: rb_cairo_private.c
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_private.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- rb_cairo_private.c	17 Aug 2008 06:04:50 -0000	1.10
+++ rb_cairo_private.c	17 Aug 2008 07:21:42 -0000	1.11
@@ -130,6 +130,7 @@
   return RSTRING_PTR (inspected);
 }
 
+#if CAIRO_CHECK_VERSION(1, 7, 2)
 VALUE
 rb_cairo__glyphs_to_ruby_object (cairo_glyph_t *glyphs, int num_glyphs)
 {
@@ -211,6 +212,7 @@
       *cluster = *(RVAL2CRTEXTCLUSTER (RARRAY_PTR (rb_clusters)[i]));
     }
 }
+#endif
 
 VALUE
 rb_cairo__invoke_callback (cr_callback_func_t func, VALUE data)

Index: rb_cairo_private.h
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_private.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- rb_cairo_private.h	16 Aug 2008 12:52:17 -0000	1.12
+++ rb_cairo_private.h	17 Aug 2008 07:21:42 -0000	1.13
@@ -95,6 +95,7 @@
 
 const char *rb_cairo__inspect (VALUE object);
 
+#if CAIRO_CHECK_VERSION(1, 7, 2)
 VALUE rb_cairo__glyphs_to_ruby_object (cairo_glyph_t *glyphs, int num_glyphs);
 void rb_cairo__glyphs_from_ruby_object (VALUE rb_glyphs,
                                         cairo_glyph_t **glyphs, int *num_glyphs);
@@ -103,6 +104,7 @@
 void rb_cairo__text_clusters_from_ruby_object (VALUE rb_clusters,
                                                cairo_text_cluster_t **clusters,
                                                int *num_clusters);
+#endif
 
 cairo_status_t rb_cairo__exception_to_status (VALUE exception);
 



More information about the cairo-commit mailing list