[libvirt] [libvirt-glib] object: Add "transfer none" annotation to argv parameter

This makes the parameter to be passed "unowned" in Vala. This was previously done using a vala metadata file, but it's better to do it directly through a gtk-doc annotation, as this means the gir file will know about this, and thus any gir-based binding can make use of this info. This also makes libvirt-gobject consistent with what was done for gconfig and glib in commit 431720. --- libvirt-gobject/libvirt-gobject-main.c | 4 ++-- vapi/LibvirtGObject-1.0.metadata | 2 -- vapi/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 vapi/LibvirtGObject-1.0.metadata diff --git a/libvirt-gobject/libvirt-gobject-main.c b/libvirt-gobject/libvirt-gobject-main.c index 31d2514..11ea24a 100644 --- a/libvirt-gobject/libvirt-gobject-main.c +++ b/libvirt-gobject/libvirt-gobject-main.c @@ -33,7 +33,7 @@ /** * gvir_init_object: * @argc: (inout): pointer to application's argc - * @argv: (inout) (array length=argc) (allow-none): pointer to application's argv + * @argv: (inout) (array length=argc) (allow-none) (transfer none): pointer to application's argv */ void gvir_init_object(int *argc, char ***argv) @@ -58,7 +58,7 @@ static void gvir_log_handler(const gchar *log_domain G_GNUC_UNUSED, /** * gvir_init_object_check: * @argc: (inout): pointer to application's argc - * @argv: (inout) (array length=argc) (allow-none): pointer to application's argv + * @argv: (inout) (array length=argc) (allow-none) (transfer none): pointer to application's argv * @err: pointer to a #GError to which a message will be posted on error */ gboolean gvir_init_object_check(int *argc, diff --git a/vapi/LibvirtGObject-1.0.metadata b/vapi/LibvirtGObject-1.0.metadata deleted file mode 100644 index 90e5197..0000000 --- a/vapi/LibvirtGObject-1.0.metadata +++ /dev/null @@ -1,2 +0,0 @@ -init_object.argv unowned -init_object_check.argv unowned diff --git a/vapi/Makefile.am b/vapi/Makefile.am index 2ecc3e3..0154104 100644 --- a/vapi/Makefile.am +++ b/vapi/Makefile.am @@ -44,4 +44,4 @@ CLEANFILES = \ libvirt-gobject-1.0.vapi \ $(NULL) -EXTRA_DIST = LibvirtGObject-1.0.metadata libvirt-gobject-1.0.deps +EXTRA_DIST = libvirt-gobject-1.0.deps -- 1.8.1.4

At Wed, 17 Apr 2013 10:17:42 +0200, Christophe Fergeau wrote:
This makes the parameter to be passed "unowned" in Vala. This was previously done using a vala metadata file, but it's better to do it directly through a gtk-doc annotation, as this means the gir file will know about this, and thus any gir-based binding can make use of this info.
Looks good. (unauthoritative) ACK. -- AV-Test GmbH, Henricistraße 20, 04155 Leipzig, Germany Phone: +49 341 265 310 19 Web:<http://www.av-test.org> Eingetragen am / Registered at: Amtsgericht Stendal (HRB 114076) Geschaeftsfuehrer (CEO): Andreas Marx, Guido Habicht, Maik Morgenstern

On Wed, Apr 17, 2013 at 2:53 PM, Claudio Bley <cbley@av-test.de> wrote:
At Wed, 17 Apr 2013 10:17:42 +0200, Christophe Fergeau wrote:
This makes the parameter to be passed "unowned" in Vala. This was previously done using a vala metadata file, but it's better to do it directly through a gtk-doc annotation, as this means the gir file will know about this, and thus any gir-based binding can make use of this info.
Looks good. (unauthoritative) ACK. --
ACK
participants (3)
-
Christophe Fergeau
-
Claudio Bley
-
Zeeshan Ali (Khattak)