diff options
author | Giovanni Campagna <gcampagna@src.gnome.org> | 2012-02-06 21:06:54 +0100 |
---|---|---|
committer | Giovanni Campagna <gcampagna@src.gnome.org> | 2012-02-06 21:06:54 +0100 |
commit | 1774b8ca893508a7d5a181946fca7d0bc2c69929 (patch) | |
tree | 9259aaf716a3c8dd26b0e7692b22a26f140add84 | |
parent | 36094f3aec9123ee13eb466f13e991bd129a1af1 (diff) | |
download | gjs-1774b8ca893508a7d5a181946fca7d0bc2c69929.tar.gz |
Revert "Skip only user_data in callbacks"
This reverts commit 97e08e590609c2777910c3b89b6b0e7f64a7aa08.
This commit is an API break for callbacks that were previously
passed void* pointers, and started to find an undefined argument
there.
-rw-r--r-- | gi/function.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/gi/function.c b/gi/function.c index b2cfa074..9834ab3e 100644 --- a/gi/function.c +++ b/gi/function.c @@ -230,6 +230,10 @@ gjs_callback_closure(ffi_cif *cif, g_callable_info_load_arg(trampoline->info, i, &arg_info); g_arg_info_load_type(&arg_info, &type_info); + /* Skip void * arguments */ + if (g_type_info_get_tag(&type_info) == GI_TYPE_TAG_VOID) + continue; + if (g_arg_info_get_direction(&arg_info) == GI_DIRECTION_OUT) { n_outargs++; continue; @@ -449,7 +453,6 @@ gjs_callback_trampoline_new(JSContext *context, GIArgInfo arg_info; GITypeInfo type_info; GITypeTag type_tag; - gint closure; if (trampoline->param_types[i] == PARAM_SKIPPED) continue; @@ -465,14 +468,6 @@ gjs_callback_trampoline_new(JSContext *context, continue; } - closure = g_arg_info_get_closure(&arg_info); - if (closure == i) { - /* A closure id equal to current parameter is used to signal the user_data - argument in a callback */ - trampoline->param_types[i] = PARAM_SKIPPED; - continue; - } - if (type_tag == GI_TYPE_TAG_INTERFACE) { GIBaseInfo* interface_info; GIInfoType interface_type; |