Created
August 18, 2014 06:27
-
-
Save cosmo0920/9c34c44f3c800c60d826 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/gobject-introspection/ext/gobject-introspection/rb-gi-constructor-info.c b/gobject-introspection/ext/gobject-introspection/rb-gi-constructor-info.c | |
index c2387b0..376fdb7 100644 | |
--- a/gobject-introspection/ext/gobject-introspection/rb-gi-constructor-info.c | |
+++ b/gobject-introspection/ext/gobject-introspection/rb-gi-constructor-info.c | |
@@ -94,6 +94,7 @@ rg_invoke(VALUE self, VALUE rb_options) | |
VALUE receiver; | |
GIArgument return_value; | |
GITypeInfo return_value_info; | |
+ VALUE val, state; | |
info = SELF(self); | |
callable_info = (GICallableInfo *)info; | |
@@ -109,9 +110,14 @@ rg_invoke(VALUE self, VALUE rb_options) | |
RBG_INSPECT(rb_options)); | |
} | |
/* TODO: use rb_protect */ | |
- rb_gi_function_info_invoke_raw(info, | |
- rb_options, | |
- &return_value); | |
+ val = rb_protect(rb_gi_function_info_invoke_raw, | |
+ (info, rb_options, &return_value), | |
+ &state); | |
+ | |
+ if (state != 0) { | |
+ puts("大域脱出が起きた"); | |
+ rb_jump_tag(status); | |
+ } | |
g_callable_info_load_return_type(callable_info, &return_value_info); | |
initialize_receiver(receiver, &return_value_info, &return_value); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment