diff options
Diffstat (limited to 'src/core/defs.h')
| -rw-r--r-- | src/core/defs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/defs.h b/src/core/defs.h index 9c745660..13d0b25f 100644 --- a/src/core/defs.h +++ b/src/core/defs.h @@ -17,6 +17,10 @@ // superior, support for such are not universal. #define NNI_ARG_UNUSED(x) ((void) x); +#define NNI_ASSERT(x) \ + if (!(x)) \ + nni_panic("%s: %d: assert err: %s", __FILE__, __LINE__, # x) + // These types are common but have names shared with user space. typedef struct nng_socket nni_sock; typedef struct nng_endpoint nni_ep; |
