From c1f3a628d0e3a2a56c67f2f7109a7a0322c6f405 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Tomko?= Date: Thu, 24 Sep 2020 14:15:52 +0200 Subject: [PATCH] docs: glib-adoption: add string arrays and objects MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Ján Tomko Reviewed-by: Andrea Bolognani --- docs/glib-adoption.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/glib-adoption.rst b/docs/glib-adoption.rst index 1cf5b9cf9b..f969ac80a1 100644 --- a/docs/glib-adoption.rst +++ b/docs/glib-adoption.rst @@ -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. -- 2.47.2