alist: Add a comment for alist_init_struct()

Comment this macro so that it is clear how to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2024-10-19 09:21:42 -06:00
parent a8c07ac497
commit 13bd298499

View File

@@ -198,6 +198,12 @@ bool alist_expand_by(struct alist *lst, uint inc_by);
*/
bool alist_init(struct alist *lst, uint obj_size, uint alloc_size);
/**
* alist_init_struct() - Typed version of alist_init()
*
* Use as:
* alist_init(&lst, struct my_struct);
*/
#define alist_init_struct(_lst, _struct) \
alist_init(_lst, sizeof(_struct), 0)