From: Not Zed Date: Sun, 7 Jan 2024 22:17:21 +0000 (+1030) Subject: Static initialiser for array, fix some documentation. X-Git-Url: https://code.zedzone.au/cvs?a=commitdiff_plain;h=cee8aab5a29008dc16bf9861145690de1159157f;p=libeze Static initialiser for array, fix some documentation. --- diff --git a/ez-array.h b/ez-array.h index 76efe4a..81487aa 100644 --- a/ez-array.h +++ b/ez-array.h @@ -22,6 +22,8 @@ typedef struct ez_array ez_array; +#define EZ_INIT_ARRAY(a) { 0 } + // layout compatible with ez_blob struct ez_array { size_t ea_size; // valid size in bytes diff --git a/ez-set.h b/ez-set.h index 19ef7e2..b9be90f 100644 --- a/ez-set.h +++ b/ez-set.h @@ -183,7 +183,7 @@ static __inline__ void *ez_set_scan_get(ez_set_scan *scan) { ez_set_scan scan; struct entry_type *entry; - for (entry = ez_scan_init(set, &scan); entry; entry = ez_scan_next(&scan)) { + for (entry = ez_set_scan_init(set, &scan); entry; entry = ez_set_scan_next(&scan)) { ... work on entry ... }