[cairo-commit] rcairo/src/lib cairo.rb,1.17,1.18

Kouhei Sutou commit at pdx.freedesktop.org
Sat Aug 16 05:52:19 PDT 2008


Committed by: kou

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

Modified Files:
	cairo.rb 
Log Message:
        * src/lib/cairo.rb (Cairo.exit_application): add.

        * src/rb_cairo_surface.c: use rb_cairo__invoke_callback().

        * src/rb_cairo_private.c, src/rb_cairo_private.h
        (rb_cairo__invoke_callback): use rb_protect() and exit if an
        exception is raised in callback.

        * src/rb_cairo_font_face.c: support Cairo::UserFontFace.

        * src/rb_cairo_exception.c, src/rb_cairo_private.h
        (rb_cairo__exception_to_status): add.

        * src/rb_cairo_context.c (cr_show_text_glyphs): initialize variables.

        * src/cairo.def, src/rb_cairo.h: add
        rb_cCairo_UserFontFace_TextToGlyphsData.

        * test/test_font_face.rb: add tests for user font.


Index: cairo.rb
===================================================================
RCS file: /cvs/cairo/rcairo/src/lib/cairo.rb,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- cairo.rb	24 Apr 2008 06:00:47 -0000	1.17
+++ cairo.rb	16 Aug 2008 12:52:17 -0000	1.18
@@ -45,14 +45,19 @@
 module Cairo
   class << self
     undef __add_one_arg_setter
-  end
 
-  module_function
-  def bindings_version
-    major, minor, micro, tag = BINDINGS_VERSION
-    version = [major, minor, micro].join('.')
-    version << "-#{tag}" if tag
-    version
+    def bindings_version
+      major, minor, micro, tag = BINDINGS_VERSION
+      version = [major, minor, micro].join('.')
+      version << "-#{tag}" if tag
+      version
+    end
+
+    def exit_application(exception, status)
+      puts("#{exception.class}: #{exception}")
+      puts(exception.backtrace)
+      exit(status)
+    end
   end
 
   class Surface



More information about the cairo-commit mailing list