aboutsummaryrefslogtreecommitdiff
path: root/src/util_ct.h
blob: 1aadbe2c5c7987478afdba66b0ba19c59a89c479 (plain)
1
2
3
4
5
6
7
8
9
10
11
#pragma once
#include <assert.h>


#define PRNE_LIMIT_ENUM(t,x,l) _Static_assert(x<=l,"enum overflow: "#t)

#define prne_op_spaceship(a, b) (a == b ? 0 : a < b ? -1 : 1)

#if !defined(memzero)
#define memzero(addr, len) memset(addr, 0, len)
#endif