]> xenbits.xensource.com Git - libvirt.git/commit
util: virstring: Remove virStringListAdd and virStringListRemove
authorPeter Krempa <pkrempa@redhat.com>
Fri, 5 Feb 2021 13:26:57 +0000 (14:26 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 11 Feb 2021 16:05:33 +0000 (17:05 +0100)
commit2b3e39067434b39f0a100583b16cd1565db3ad5d
tree424fb24a74ddbe27bb20ea0362120f33b9d322c1
parent67c345cb97e8da58d5bffe21b9a247fd4341ecb1
util: virstring: Remove virStringListAdd and virStringListRemove

virStringListAdd hides the fact that a O(n) count of elements is
performed every time it's called which makes it inefficient.

Stop supporting such semantics and remove the helpers. Users have a
choice of using GSList or an array with a counter variable rather than
repeated lookups.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/libvirt_private.syms
src/util/virstring.c
src/util/virstring.h
tests/virstringtest.c