summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2011-10-30 16:31:23 +0100
committerMartin Pitt <martinpitt@gnome.org>2012-03-27 17:42:30 +0200
commit4d8e35ecdc756fa7439a1dc4e08ebd9964d92a73 (patch)
treeae1b48a7a2df48cddc0fb552fdd4b8a71fe87a58
parent9406a644ba29c3df59c6493843fe06dea5614c24 (diff)
downloadgobject-introspection-4d8e35ecdc756fa7439a1dc4e08ebd9964d92a73.tar.gz
Make g_callable_info_invoke public
So it can be used for invoking callbacks https://bugzilla.gnome.org/show_bug.cgi?id=663052 Signed-off-by: Martin Pitt <martinpitt@gnome.org>
-rw-r--r--girepository/gicallableinfo.c20
-rw-r--r--girepository/gicallableinfo.h10
-rw-r--r--girepository/gifunctioninfo.c20
-rw-r--r--girepository/girepository-private.h11
-rw-r--r--girepository/givfuncinfo.c20
5 files changed, 40 insertions, 41 deletions
diff --git a/girepository/gicallableinfo.c b/girepository/gicallableinfo.c
index 25372ffa..95fa2fc2 100644
--- a/girepository/gicallableinfo.c
+++ b/girepository/gicallableinfo.c
@@ -432,16 +432,16 @@ gi_type_info_extract_ffi_return_value (GITypeInfo *return_info,
}
gboolean
-_g_callable_info_invoke (GIFunctionInfo *info,
- gpointer function,
- const GIArgument *in_args,
- int n_in_args,
- const GIArgument *out_args,
- int n_out_args,
- GIArgument *return_value,
- gboolean is_method,
- gboolean throws,
- GError **error)
+g_callable_info_invoke (GIFunctionInfo *info,
+ gpointer function,
+ const GIArgument *in_args,
+ int n_in_args,
+ const GIArgument *out_args,
+ int n_out_args,
+ GIArgument *return_value,
+ gboolean is_method,
+ gboolean throws,
+ GError **error)
{
ffi_cif cif;
ffi_type *rtype;
diff --git a/girepository/gicallableinfo.h b/girepository/gicallableinfo.h
index 0c5fac79..48c08c41 100644
--- a/girepository/gicallableinfo.h
+++ b/girepository/gicallableinfo.h
@@ -55,6 +55,16 @@ GIArgInfo * g_callable_info_get_arg (GICallableInfo *info,
void g_callable_info_load_arg (GICallableInfo *info,
gint n,
GIArgInfo *arg);
+gboolean g_callable_info_invoke (GICallableInfo *info,
+ gpointer function,
+ const GIArgument *in_args,
+ int n_in_args,
+ const GIArgument *out_args,
+ int n_out_args,
+ GIArgument *return_value,
+ gboolean is_method,
+ gboolean throws,
+ GError **error);
G_END_DECLS
diff --git a/girepository/gifunctioninfo.c b/girepository/gifunctioninfo.c
index 92f4ccd2..a5858c76 100644
--- a/girepository/gifunctioninfo.c
+++ b/girepository/gifunctioninfo.c
@@ -271,14 +271,14 @@ g_function_info_invoke (GIFunctionInfo *info,
&& (g_function_info_get_flags (info) & GI_FUNCTION_IS_CONSTRUCTOR) == 0;
throws = g_function_info_get_flags (info) & GI_FUNCTION_THROWS;
- return _g_callable_info_invoke ((GICallableInfo*) info,
- func,
- in_args,
- n_in_args,
- out_args,
- n_out_args,
- return_value,
- is_method,
- throws,
- error);
+ return g_callable_info_invoke ((GICallableInfo*) info,
+ func,
+ in_args,
+ n_in_args,
+ out_args,
+ n_out_args,
+ return_value,
+ is_method,
+ throws,
+ error);
}
diff --git a/girepository/girepository-private.h b/girepository/girepository-private.h
index 05b13626..275776d8 100644
--- a/girepository/girepository-private.h
+++ b/girepository/girepository-private.h
@@ -108,17 +108,6 @@ GIVFuncInfo * _g_base_info_find_vfunc (GIRealInfo *rinfo,
gint n_vfuncs,
const gchar *name);
-gboolean _g_callable_info_invoke (GICallableInfo *info,
- gpointer function,
- const GIArgument *in_args,
- int n_in_args,
- const GIArgument *out_args,
- int n_out_args,
- GIArgument *return_value,
- gboolean is_method,
- gboolean throws,
- GError **error);
-
extern ffi_status ffi_prep_closure_loc (ffi_closure *,
ffi_cif *,
void (*fun)(ffi_cif *, void *, void **, void *),
diff --git a/girepository/givfuncinfo.c b/girepository/givfuncinfo.c
index f80396c0..462521b6 100644
--- a/girepository/givfuncinfo.c
+++ b/girepository/givfuncinfo.c
@@ -308,14 +308,14 @@ g_vfunc_info_invoke (GIVFuncInfo *info,
if (*error != NULL)
return FALSE;
- return _g_callable_info_invoke ((GICallableInfo*) info,
- func,
- in_args,
- n_in_args,
- out_args,
- n_out_args,
- return_value,
- TRUE,
- FALSE,
- error);
+ return g_callable_info_invoke ((GICallableInfo*) info,
+ func,
+ in_args,
+ n_in_args,
+ out_args,
+ n_out_args,
+ return_value,
+ TRUE,
+ FALSE,
+ error);
}