diff options
| author | 2025-12-11 20:43:24 +0100 | |
|---|---|---|
| committer | 2025-12-11 20:43:24 +0100 | |
| commit | 88652eeb10cd9381aafb2d55e9474bb0799630b1 (patch) | |
| tree | 2ba02aa77ce8357e29ddb502aee18109a90bd136 /type.c | |
| parent | 2bbdb7a6b8204ae3caa5235c4ba637834036a299 (diff) | |
rename arraylength macro -> countof
Diffstat (limited to 'type.c')
| -rw-r--r-- | type.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |