[cairo-commit] rcairo/src rb_cairo_context.c,1.3,1.4
Kouhei Sutou
commit at pdx.freedesktop.org
Sat Apr 14 23:37:36 PDT 2007
Committed by: kou
Update of /cvs/cairo/rcairo/src
In directory kemper:/tmp/cvs-serv13274/src
Modified Files:
rb_cairo_context.c
Log Message:
* src/rb_cairo_context.c (cr_push_group): added error handling.
Index: rb_cairo_context.c
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_context.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- rb_cairo_context.c 15 Apr 2007 06:13:55 -0000 1.3
+++ rb_cairo_context.c 15 Apr 2007 06:37:27 -0000 1.4
@@ -163,14 +163,22 @@
if (rb_block_given_p ())
{
+ int state = 0;
+
if (NIL_P (pop_to_source))
pop_to_source = Qtrue;
- result = rb_yield (self);
- if (RTEST (pop_to_source))
- cr_pop_group_to_source (self);
- else
- result = cr_pop_group (self);
+ result = rb_protect (rb_yield, self, &state);
+ if (cairo_status(_SELF) == CAIRO_STATUS_SUCCESS)
+ {
+ if (RTEST (pop_to_source))
+ cr_pop_group_to_source (self);
+ else
+ result = cr_pop_group (self);
+ }
+
+ if (state)
+ rb_jump_tag (state);
}
return result;
More information about the cairo-commit
mailing list