From 6426ac05eb8c4dc1ab22aae2eb4139f9671981b7 Mon Sep 17 00:00:00 2001 From: Tyge Lovset Date: Sat, 8 Apr 2023 22:30:46 +0200 Subject: Reverted c_arraylen(), removed c_ARRAYLEN() --- include/stc/ccommon.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/stc/ccommon.h') 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; -- cgit v1.2.3