diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-08-23 15:16:04 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-08-27 11:44:07 +0200 |
| commit | 03b645f22bfc7afadc5a8aa6d59edf0eba74a048 (patch) | |
| tree | dda64286a408e104879be2544f9c7dc8aa8e333a /include/assert.h | |
| parent | 6836db9b00d4f13a78a53cc5bdb0b63028188b55 (diff) | |
cleanup & json string simd parsing
Diffstat (limited to 'include/assert.h')
| -rw-r--r-- | include/assert.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/assert.h b/include/assert.h new file mode 100644 index 0000000..ad9c2fd --- /dev/null +++ b/include/assert.h @@ -0,0 +1,14 @@ +#pragma once + +#include <stdio.h> +#include <stdlib.h> + +#define assert(condition, ...) \ + do { \ + if (!(condition)) { \ + fprintf(stderr, "Assertion failed: %s:%d in %s(): ", __FILE__, __LINE__, __func__); \ + fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, "\n"); \ + abort(); \ + } \ + } while (0) |
