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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]