Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions c/tskit/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ extern "C" {
#endif

#include <stdbool.h>
#include <limits.h>

#ifdef __GNUC__
#define TSK_WARN_UNUSED __attribute__((warn_unused_result))
Expand All @@ -46,6 +47,11 @@ extern "C" {
#define restrict
#endif

/* We assume CHAR_BIT == 8 when loading strings from 8-bit byte arrays */
#if CHAR_BIT != 8
#error CHAR_BIT MUST EQUAL 8
#endif

/* This sets up TSK_DBL_DECIMAL_DIG, which can then be used as a
* precision specifier when writing out doubles, if you want sufficient
* decimal digits to be written to guarantee a lossless round-trip
Expand Down