Commit | Line | Data |
---|---|---|
1 | @param@ | |
2 | @@ | |
3 | ||
4 | #include <sys/param.h> | |
5 | ||
6 | @depends on param@ | |
7 | type E; | |
8 | E[] T; | |
9 | @@ | |
10 | ||
11 | - sizeof(T)/sizeof(E) | |
12 | + NELEM(T) | |
13 | ||
14 | @depends on param@ | |
15 | type E; | |
16 | E[] T; | |
17 | @@ | |
18 | ||
19 | - sizeof(T)/sizeof(*T) | |
20 | + NELEM(T) | |
21 | ||
22 | @depends on param@ | |
23 | type E; | |
24 | E[] T; | |
25 | @@ | |
26 | ||
27 | - sizeof(T)/sizeof(T[...]) | |
28 | + NELEM(T) |