]> xenbits.xensource.com Git - libvirt.git/commit
util: hash: Add new constructor 'virHashNew'
authorPeter Krempa <pkrempa@redhat.com>
Wed, 9 Oct 2019 13:34:54 +0000 (15:34 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 21 Oct 2019 14:53:42 +0000 (16:53 +0200)
commitdefd31358e71b4b4e1327f3f04fcd298f21fd08a
tree735fa4d581d46a268990cab7e0d1261548201f51
parent49288fac965f0ee23db45d83ae4ef3a9a71dafd0
util: hash: Add new constructor 'virHashNew'

Add a simpler constructor for hash tables which specifically does not
require specifying the initial hash size and uses simpler freeing
function.

The initial hash table size usually is not important as the hash table
is growing when it reaches certain number of entries in one bucket.
Additionally many callers pass in a random small number for ad-hoc table
use so using a central one will simplify things.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
ACKed-by: Eric Blake <eblake@redhat.com>
src/libvirt_private.syms
src/util/virhash.c
src/util/virhash.h