Skip to content

Commit af97b83

Browse files
Try again
1 parent eda455e commit af97b83

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

middleware/include/bitstream.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
#include <stddef.h>
99
#include <math.h>
1010

11-
#define STATIC_ASSERT _Static_assert // Compile-time assertion (C11 thing)
11+
/* Throws a compile-time error if the assert fails */
12+
#define STATIC_ASSERT(condition, message) \
13+
typedef char static_assertion_##__LINE__[(condition) ? 1 : -1]
1214

1315
typedef struct {
1416
uint8_t *data; // The bitstream data, stored as bytes

0 commit comments

Comments
 (0)