From cc3a585e37cf58b61cbea599cc4de93cf713834b Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sat, 5 Oct 2024 08:14:27 -0600 Subject: compiles --- lib9p/map.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib9p/map.h') diff --git a/lib9p/map.h b/lib9p/map.h index ea9cdb6..833f4f5 100644 --- a/lib9p/map.h +++ b/lib9p/map.h @@ -28,8 +28,8 @@ #define MAP_KV(TNAME) CAT3(_,TNAME,_kv) #define MAP_METHOD(TNAME, MNAME) CAT3(TNAME,_,MNAME) #define MAP_FOREACH(m, k, v) \ - for (size_t i = 0, typeof(m->items[0].key) k, typeof(&m->items[0].val) v; i < ARRAY_LEN(m->items); i++) \ - if ( ({ k = m->items[i].key; v = &m->items[i].val; m->items[i].set; }) ) + for (size_t i = 0; i < ARRAY_LEN((m)->items); i++) \ + if ( ({ k = (m)->items[i].key; v = &(m)->items[i].val; (m)->items[i].set; }) ) #endif /* This implementation is just an array that we brute-force search -- cgit v1.2.3-2-g168b