diff options
author | Colin Walters <walters@src.gnome.org> | 2008-11-05 22:09:44 +0000 |
---|---|---|
committer | Colin Walters <walters@src.gnome.org> | 2008-11-05 22:09:44 +0000 |
commit | a32d1db1fd411e900ce82ed759e8b5a00a89545b (patch) | |
tree | e920262a22a28c6c59c9284802e18beb122282d3 /girepository/ginvoke.c | |
parent | d82cf5bb305fc74d05bb38531d548c3afe9691a8 (diff) | |
download | gobject-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.c | 7 |
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; } |