aboutsummaryrefslogtreecommitdiffhomepage
path: root/type.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-11 20:43:24 +0100
committerlemon <lsof@mailbox.org>2025-12-11 20:43:24 +0100
commit88652eeb10cd9381aafb2d55e9474bb0799630b1 (patch)
tree2ba02aa77ce8357e29ddb502aee18109a90bd136 /type.c
parent2bbdb7a6b8204ae3caa5235c4ba637834036a299 (diff)
rename arraylength macro -> countof
Diffstat (limited to 'type.c')
-rw-r--r--type.c6
1 files changed, 3 insertions, 3 deletions
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