diff options
Diffstat (limited to 'src/shared.h')
| -rw-r--r-- | src/shared.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared.h b/src/shared.h index 684fb9f..05ab58c 100644 --- a/src/shared.h +++ b/src/shared.h | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | #include <stddef.h> | 4 | #include <stddef.h> |
| 5 | #include <stdarg.h> | 5 | #include <stdarg.h> |
| 6 | 6 | ||
| 7 | #define STATICARRAY_SIZE(arr) (sizeof((arr))/sizeof((arr)[0])) | ||
| 8 | |||
| 7 | // Defines how `x___alloc()` functions should exit. `___VXGG___XCALLOC_EXIT_ON_ERROR___ > 0` calls `error()`, and thus functions | 9 | // Defines how `x___alloc()` functions should exit. `___VXGG___XCALLOC_EXIT_ON_ERROR___ > 0` calls `error()`, and thus functions |
| 8 | // registered with `atexit()` and `on_exit()`. `___VXGG___XCALLOC_EXIT_ON_ERROR___ <= 0` calls `abort()` on error. `xcalloc()` | 10 | // registered with `atexit()` and `on_exit()`. `___VXGG___XCALLOC_EXIT_ON_ERROR___ <= 0` calls `abort()` on error. `xcalloc()` |
| 9 | // will ALWAYS 'abort', doing otherwise defeats the purpose of the function | 11 | // will ALWAYS 'abort', doing otherwise defeats the purpose of the function |
