[libvirt PATCH v2 1/3] docs: Drop glib-adoption.rst

Andrea Bolognani abologna at redhat.com
Mon May 11 12:35:33 UTC 2020


On Mon, 2020-05-11 at 14:24 +0200, Ján Tomko wrote:
> On a Thursday in 2020, Andrea Bolognani wrote:
> > -The following is a list of libvirt APIs that should no longer be
> > -used in new code, and their suggested GLib replacements:
> > -
> > -``VIR_ALLOC``, ``VIR_REALLOC``, ``VIR_RESIZE_N``, ``VIR_EXPAND_N``, ``VIR_SHRINK_N``, ``VIR_FREE``, ``VIR_APPEND_ELEMENT``, ``VIR_INSERT_ELEMENT``, ``VIR_DELETE_ELEMENT``
> > -   Prefer the GLib APIs ``g_new0``/``g_renew``/ ``g_free`` in most
> > -   cases. There should rarely be a need to use
> > -   ``g_malloc``/``g_realloc``. Instead of using plain C arrays, it
> 
> This is the only place where the preferred GLib functions are
> documented, I think deleting it is premature.

The patch has already been merged.

I think regular contributors have become used to the GLib APIs by
now, and drive-by contributors were probably not familiar with the
libvirt APIs in the first place, so this list was of no use to them.

That said, if you think there's value in keeping this document
around, you can definitely post a revert patch and see where that
goes :)

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list