diff options
| author | Tyge Lovset <[email protected]> | 2023-04-08 22:30:46 +0200 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2023-04-08 22:30:46 +0200 |
| commit | 6426ac05eb8c4dc1ab22aae2eb4139f9671981b7 (patch) | |
| tree | f3b9917940f94c1582bc39ea6f56b735295ec861 /include/stc/ccommon.h | |
| parent | 2f64fae1f2f041ad3aec4a2388975297075fef42 (diff) | |
| download | STC-modified-6426ac05eb8c4dc1ab22aae2eb4139f9671981b7.tar.gz STC-modified-6426ac05eb8c4dc1ab22aae2eb4139f9671981b7.zip | |
Reverted c_arraylen(), removed c_ARRAYLEN()
Diffstat (limited to 'include/stc/ccommon.h')
| -rw-r--r-- | include/stc/ccommon.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/stc/ccommon.h b/include/stc/ccommon.h index 1a2b3c3f..d5508807 100644 --- a/include/stc/ccommon.h +++ b/include/stc/ccommon.h @@ -123,8 +123,7 @@ C##_from_n((C##_raw[])__VA_ARGS__, c_sizeof((C##_raw[])__VA_ARGS__)/c_sizeof(C##_raw)) #define c_litstrlen(literal) (c_sizeof("" literal) - 1) -#define c_arraylen(a) (c_ARRAYLEN(a) + c_static_assert(sizeof(a) != sizeof(uintptr_t))) -#define c_ARRAYLEN(a) (intptr_t)(sizeof(a)/sizeof 0[a]) +#define c_arraylen(a) (intptr_t)(sizeof(a)/sizeof 0[a]) // Non-owning c-string typedef const char* crawstr; |
