summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2024-10-19 09:21:42 -0600
committerSimon Glass <[email protected]>2024-11-02 11:13:59 -0600
commit13bd29849953c7d5294b64ba22495a928dd70d80 (patch)
treeb432a71922a12e481ef0f15294324b9f74e8d920 /include
parenta8c07ac4970d92dce76d93e61fdddb7f3bea65e4 (diff)
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 <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/alist.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/alist.h b/include/alist.h
index 0343946bc4a..a727f1c7dfa 100644
--- a/include/alist.h
+++ b/include/alist.h
@@ -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)