summaryrefslogtreecommitdiff
path: root/girepository/girnode.c
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2014-05-06 18:53:21 +0200
committerGiovanni Campagna <gcampagna@src.gnome.org>2014-07-03 10:31:17 +0200
commita4c9d09d7a89d3c80b4465a5c2ae0efa24158b24 (patch)
treef56b061a761dd45ed64d9015c8a7cf00b46be710 /girepository/girnode.c
parentb2bf49eae922bffddc952fcc22e4acbd7d40c5f3 (diff)
downloadgobject-introspection-a4c9d09d7a89d3c80b4465a5c2ae0efa24158b24.tar.gz
Parse and expose ownership transfer for instance parameters
Knowing the ownership transfer for instance parameters is necessary for correct memory management of functions which "eat" their instance argument, such as g_dbus_method_invocation_return_*. Parse this information from the gir file and store in the typelib, and then provide new API on GICallableInfo to retrieve this. https://bugzilla.gnome.org/show_bug.cgi?id=729662
Diffstat (limited to 'girepository/girnode.c')
-rw-r--r--girepository/girnode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/girepository/girnode.c b/girepository/girnode.c
index 53385c26..a7a77e31 100644
--- a/girepository/girnode.c
+++ b/girepository/girnode.c
@@ -1664,6 +1664,7 @@ _g_ir_node_build_typelib (GIrNode *node,
blob2->caller_owns_return_value = function->result->transfer;
blob2->caller_owns_return_container = function->result->shallow_transfer;
blob2->skip_return = function->result->skip;
+ blob2->instance_transfer_ownership = function->instance_transfer_full;
blob2->reserved = 0;
blob2->n_arguments = n;
@@ -1762,6 +1763,7 @@ _g_ir_node_build_typelib (GIrNode *node,
blob2->may_return_null = signal->result->nullable;
blob2->caller_owns_return_value = signal->result->transfer;
blob2->caller_owns_return_container = signal->result->shallow_transfer;
+ blob2->instance_transfer_ownership = signal->instance_transfer_full;
blob2->reserved = 0;
blob2->n_arguments = n;
@@ -1820,6 +1822,7 @@ _g_ir_node_build_typelib (GIrNode *node,
blob2->may_return_null = vfunc->result->nullable;
blob2->caller_owns_return_value = vfunc->result->transfer;
blob2->caller_owns_return_container = vfunc->result->shallow_transfer;
+ blob2->instance_transfer_ownership = vfunc->instance_transfer_full;
blob2->reserved = 0;
blob2->n_arguments = n;