[cairo-commit] rcairo/src rb_cairo_context.c,1.2,1.3

Kouhei Sutou commit at pdx.freedesktop.org
Sat Apr 14 23:14:04 PDT 2007


Committed by: kou

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

Modified Files:
	rb_cairo_context.c 
Log Message:
* src/rb_cairo_context.c
  (cr_pop_group): returned pattern.
  (cr_push_group): returned popped pattern if not pop_to_source.


Index: rb_cairo_context.c
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_context.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- rb_cairo_context.c	6 Mar 2007 12:35:40 -0000	1.2
+++ rb_cairo_context.c	15 Apr 2007 06:13:55 -0000	1.3
@@ -122,9 +122,11 @@
 static VALUE
 cr_pop_group (VALUE self)
 {
-  cairo_pop_group (_SELF);
+  cairo_pattern_t *pattern;
+
+  pattern = cairo_pop_group (_SELF);
   cr_check_status (_SELF);
-  return Qnil;
+  return CRPATTERN2RVAL (pattern, rb_cCairo_SurfacePattern);
 }
 
 static VALUE
@@ -164,10 +166,11 @@
       if (NIL_P (pop_to_source))
         pop_to_source = Qtrue;
 
+      result = rb_yield (self);
       if (RTEST (pop_to_source))
-        result = rb_ensure (rb_yield, self, cr_pop_group_to_source, self);
+        cr_pop_group_to_source (self);
       else
-        result = rb_ensure (rb_yield, self, cr_pop_group, self);
+        result = cr_pop_group (self);
     }
 
   return result;



More information about the cairo-commit mailing list