[cairo-commit] rcairo/packages/cairo/ext rb_cairo.c,1.10,1.11

Kouhei Sutou commit at pdx.freedesktop.org
Mon Oct 10 09:07:18 PDT 2005


Committed by: kou

Update of /cvs/cairo/rcairo/packages/cairo/ext
In directory gabe:/tmp/cvs-serv5814/packages/cairo/ext

Modified Files:
	rb_cairo.c 
Log Message:
* packages/cairo/ext/rb_cairo.c: Added cairo version info.
* packages/cairo/lib/cairo.rb: Added bindings version info as
  1.0.0-beta.


Index: rb_cairo.c
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/ext/rb_cairo.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- rb_cairo.c	10 Oct 2005 15:40:26 -0000	1.10
+++ rb_cairo.c	10 Oct 2005 16:07:16 -0000	1.11
@@ -31,11 +31,34 @@
 extern void Init_cairo_pattern (void);
 extern void Init_cairo_glyph (void);
 
+
 void
 Init_cairo ()
 {
+  int major, minor, micro;
+  
   rb_mCairo = rb_define_module ("Cairo");
 
+  rb_define_const (rb_mCairo, "BUILD_VERSION",
+                   rb_ary_new3 (3,
+                                INT2FIX (CAIRO_VERSION_MAJOR),
+                                INT2FIX (CAIRO_VERSION_MINOR),
+                                INT2FIX (CAIRO_VERSION_MICRO)));
+
+  major = cairo_version () / 10000;
+  minor = (cairo_version () % 1000) / 10;
+  micro = cairo_version () % 10;
+
+  rb_define_const (rb_mCairo, "VERSION",
+                   rb_ary_new3 (3,
+                                INT2FIX (major),
+                                INT2FIX (minor),
+                                INT2FIX (micro)));
+  
+  rb_define_const (rb_mCairo, "MAJOR_VERSION", INT2FIX (major));
+  rb_define_const (rb_mCairo, "MINOR_VERSION", INT2FIX (minor));
+  rb_define_const (rb_mCairo, "MICRO_VERSION", INT2FIX (micro));
+  
   Init_cairo_context ();
   Init_cairo_path ();
   Init_cairo_matrix ();



More information about the cairo-commit mailing list