aboutsummaryrefslogtreecommitdiff
path: root/vendor/librune/include/internal/common.h
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-01-27 23:26:42 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-01-27 23:26:42 +0100
commit679f7928e27a95e559eb3a69febf0c6336e40234 (patch)
treeaf9c5bb35253086eb8e3ad3d7774e7349b3beefe /vendor/librune/include/internal/common.h
parentfd502fd87b40ae7f60314d8d9009f739f1c5fcf3 (diff)
Bump librune
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 */