]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
docs: glib-adoption: add string arrays and objects
authorJán Tomko <jtomko@redhat.com>
Thu, 24 Sep 2020 12:15:52 +0000 (14:15 +0200)
committerJán Tomko <jtomko@redhat.com>
Fri, 2 Oct 2020 12:10:44 +0000 (14:10 +0200)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
docs/glib-adoption.rst

index 1cf5b9cf9bc732f0cf8219005f6589a0614dd276..f969ac80a156fa1d48449b7ecce86a0dbf4daa64 100644 (file)
@@ -36,3 +36,19 @@ Array operations
    the GLib types, ``GArray``, ``GPtrArray`` or ``GByteArray``.
    These all use a struct to track the array memory and size
    together and efficiently resize.
+
+String arrays
+   ``virStringList*``, ``virStringListCount*``
+
+   https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html
+
+   Prefer the NULL-terminated variant instead of storing the count
+   separately. Prefer ``g_str*v`` functions instead of their ``vir*``
+   counterparts. For use with ``g_auto`` GLib provides the ``GStrv`` type.
+
+Objects
+   ``virObject``
+
+   https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html
+
+   Prefer ``GObject`` instead.