From 88652eeb10cd9381aafb2d55e9474bb0799630b1 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 11 Dec 2025 20:43:24 +0100 Subject: rename arraylength macro -> countof --- type.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'type.c') diff --git a/type.c b/type.c index dab0457..a18903c 100644 --- a/type.c +++ b/type.c @@ -66,9 +66,9 @@ tdequ(const struct typedata *a, const struct typedata *b) static ushort interntd(const struct typedata *td) { - uint h, i, n = arraylength(typedata); + uint h, i, n = countof(typedata); for (i = h = hashtd(td); n--; ++i) { - struct typedata *slot = &typedata[i &= arraylength(typedata) - 1]; + struct typedata *slot = &typedata[i &= countof(typedata) - 1]; if (!slot->t) { uint nmemb; static struct arena *datarena; @@ -185,7 +185,7 @@ completetype(const char *name, int id, struct typedata *td) { assert(td->t == TYENUM || td->t == TYSTRUCT || td->t == TYUNION); td->id = id; - assert(id < arraylength(ttypenames) && "too many tag types"); + assert(id < countof(ttypenames) && "too many tag types"); if (ttypenames[id]) assert(ttypenames[id] == name && "bad redefn"); else -- cgit v1.2.3