aboutsummaryrefslogtreecommitdiff
path: root/vendor/librune/include/internal/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/librune/include/internal/common.h')
-rw-r--r--vendor/librune/include/internal/common.h24
1 files changed, 3 insertions, 21 deletions
diff --git a/vendor/librune/include/internal/common.h b/vendor/librune/include/internal/common.h
index af490d3..ace9e63 100644
--- a/vendor/librune/include/internal/common.h
+++ b/vendor/librune/include/internal/common.h
@@ -3,27 +3,7 @@
/* IWYU pragma: private */
-#if __STDC_VERSION__ >= 202311L
-# define RUNE_IS_23 1
-#endif
-
-#if !RUNE_IS_23
-# include <stddef.h> /* IWYU pragma: export */
-# define nullptr NULL
-#endif
-
-#ifndef unreachable
-# if RUNE_IS_23
-# include <stddef.h> /* IWYU pragma: export */
-# elif defined(__GNUC__) || defined(__clang__)
-# define unreachable() __builtin_unreachable()
-# else
-# define unreachable() \
- do \
- *(int *)0 = 0; \
- while (0)
-# endif
-#endif
+#define lengthof(a) (sizeof(a) / sizeof(*(a)))
#define U1(x) (((x)&0x80) == 0x00)
#define U2(x) (((x)&0xE0) == 0xC0)
@@ -38,4 +18,6 @@
#define _3B_MAX RUNE_C(0x00FFFF)
#define _4B_MAX RUNE_C(0x10FFFF)
+#define LATIN1_MAX 0xFF
+
#endif /* !RUNE_INTERNAL_COMMON_H */