Eric Blake cf86d7b3a3 bitmap: add virBitmapCountBits
Sometimes it's handy to know how many bits are set.

* src/util/bitmap.h (virBitmapCountBits): New prototype.
(virBitmapNextSetBit): Use correct type.
* src/util/bitmap.c (virBitmapNextSetBit): Likewise.
(virBitmapSetAll): Maintain invariant of clear tail bits.
(virBitmapCountBits): New function.
* src/libvirt_private.syms (bitmap.h): Export it.
* tests/virbitmaptest.c (test2): Test it.

(cherry picked from commit 0711c4b74d1f0e83b06c5b15a50f99d780478566)
2013-08-20 14:53:23 +02:00
..
2012-04-02 09:33:54 -06:00
2012-09-17 14:59:37 -04:00
2013-08-20 14:53:23 +02:00