提交 cdfc3d7c 编写于 作者: P Peter Krempa

util: bitmap: Add comments for functions which don't have them

virBitmap code is thoroughly documented. Add docs for the few functions
missing them.
上级 fb549cd5
......@@ -146,6 +146,14 @@ virBitmapFree(virBitmapPtr bitmap)
}
/**
* virBitmapCopy:
* @dst: destination bitmap
* @src: source bitmap
*
* Copies contents of @src to @dst. @dst must have the same size as @src.
* Returns -1 if the size is not the same or 0 on success.
*/
int
virBitmapCopy(virBitmapPtr dst,
virBitmapPtr src)
......@@ -882,6 +890,12 @@ virBitmapEqual(virBitmapPtr b1,
}
/**
* virBitmapSize:
* @bitmap: virBitmap to inspect
*
* Returns number of bits @bitmap can store.
*/
size_t
virBitmapSize(virBitmapPtr bitmap)
{
......@@ -1116,7 +1130,12 @@ virBitmapNextClearBit(virBitmapPtr bitmap,
}
/* Return the number of bits currently set in the map. */
/**
* virBitmapCountBits:
* @bitmap: bitmap to inspect
*
* Return the number of bits currently set in @bitmap.
*/
size_t
virBitmapCountBits(virBitmapPtr bitmap)
{
......@@ -1192,6 +1211,14 @@ virBitmapDataFormat(const void *data,
}
/**
* virBitmapOverlaps:
* @b1: virBitmap to inspect
* @b2: virBitmap to inspect
*
* Returns true if at least one bit with the same index is set both in @b1 and
* @b2.
*/
bool
virBitmapOverlaps(virBitmapPtr b1,
virBitmapPtr b2)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册