summaryrefslogtreecommitdiff
path: root/girepository/ginvoke.c
diff options
context:
space:
mode:
authorColin Walters <walters@src.gnome.org>2008-11-05 22:09:44 +0000
committerColin Walters <walters@src.gnome.org>2008-11-05 22:09:44 +0000
commita32d1db1fd411e900ce82ed759e8b5a00a89545b (patch)
treee920262a22a28c6c59c9284802e18beb122282d3 /girepository/ginvoke.c
parentd82cf5bb305fc74d05bb38531d548c3afe9691a8 (diff)
downloadgobject-introspection-a32d1db1fd411e900ce82ed759e8b5a00a89545b.tar.gz
Don't use nested scope local variable for error
svn path=/trunk/; revision=864
Diffstat (limited to 'girepository/ginvoke.c')
-rw-r--r--girepository/ginvoke.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/girepository/ginvoke.c b/girepository/ginvoke.c
index 204c5478..af21473b 100644
--- a/girepository/ginvoke.c
+++ b/girepository/ginvoke.c
@@ -163,7 +163,8 @@ g_function_info_invoke (GIFunctionInfo *info,
gint n_args, n_invoke_args, in_pos, out_pos, i;
gpointer *args;
gboolean success = FALSE;
- GError *local_error;
+ GError *local_error = NULL;
+ gpointer error_address = &local_error;
symbol = g_function_info_get_symbol (info);
@@ -288,11 +289,9 @@ g_function_info_invoke (GIFunctionInfo *info,
g_base_info_unref ((GIBaseInfo *)ainfo);
}
- local_error = NULL;
if (throws)
{
- gpointer address = &local_error;
- args[n_invoke_args - 1] = &address;
+ args[n_invoke_args - 1] = &error_address;
atypes[n_invoke_args - 1] = &ffi_type_pointer;
}