summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--girepository/gicallableinfo.c12
-rw-r--r--girepository/girffi.h6
2 files changed, 11 insertions, 7 deletions
diff --git a/girepository/gicallableinfo.c b/girepository/gicallableinfo.c
index fec77b82..25372ffa 100644
--- a/girepository/gicallableinfo.c
+++ b/girepository/gicallableinfo.c
@@ -366,12 +366,10 @@ g_callable_info_iterate_return_attributes (GICallableInfo *info,
* Also see the ffi_call man page - the storage requirements for return
* values are "special".
*/
-typedef GIArgument GIFFIReturnValue;
-
-static void
-set_gargument_from_ffi_return_value (GITypeInfo *return_info,
- GIArgument *arg,
- GIFFIReturnValue *ffi_value)
+void
+gi_type_info_extract_ffi_return_value (GITypeInfo *return_info,
+ GIFFIReturnValue *ffi_value,
+ GIArgument *arg)
{
switch (g_type_info_get_tag (return_info)) {
case GI_TYPE_TAG_INT8:
@@ -618,7 +616,7 @@ _g_callable_info_invoke (GIFunctionInfo *info,
}
else
{
- set_gargument_from_ffi_return_value(rinfo, return_value, &ffi_return_value);
+ gi_type_info_extract_ffi_return_value (rinfo, &ffi_return_value, return_value);
success = TRUE;
}
out:
diff --git a/girepository/girffi.h b/girepository/girffi.h
index e976f924..56caff73 100644
--- a/girepository/girffi.h
+++ b/girepository/girffi.h
@@ -46,10 +46,16 @@ struct _GIFunctionInvoker {
gpointer padding[3];
};
+typedef GIArgument GIFFIReturnValue;
+
ffi_type * gi_type_tag_get_ffi_type (GITypeTag type_tag, gboolean is_pointer);
ffi_type * g_type_info_get_ffi_type (GITypeInfo *info);
+void gi_type_info_extract_ffi_return_value (GITypeInfo *return_info,
+ GIFFIReturnValue *ffi_value,
+ GIArgument *arg);
+
gboolean g_function_info_prep_invoker (GIFunctionInfo *info,
GIFunctionInvoker *invoker,
GError **error);