We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5da361b + 77ee02d commit 829fd1fCopy full SHA for 829fd1f
c/tskit/core.h
@@ -35,6 +35,7 @@ extern "C" {
35
#endif
36
37
#include <stdbool.h>
38
+#include <limits.h>
39
40
#ifdef __GNUC__
41
#define TSK_WARN_UNUSED __attribute__((warn_unused_result))
@@ -46,6 +47,11 @@ extern "C" {
46
47
#define restrict
48
49
50
+/* We assume CHAR_BIT == 8 when loading strings from 8-bit byte arrays */
51
+#if CHAR_BIT != 8
52
+#error CHAR_BIT MUST EQUAL 8
53
+#endif
54
+
55
/* This sets up TSK_DBL_DECIMAL_DIG, which can then be used as a
56
* precision specifier when writing out doubles, if you want sufficient
57
* decimal digits to be written to guarantee a lossless round-trip
0 commit comments