diff options
author | default <nobody@localhost> | 2024-04-14 19:26:49 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2024-04-14 19:26:49 +0200 |
commit | 0275658a3602f74035ff776dac8d8f64b9a2794f (patch) | |
tree | d9489684e46d7cd0d5bd8347a880316abe22f48f /xs.h | |
parent | 81cf1e21a646568323681df2763e66f933bee48f (diff) |
Backport from xs.
Diffstat (limited to 'xs.h')
-rw-r--r-- | xs.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -45,6 +45,10 @@ typedef char xs_data; /* not really all, just very much */ #define XS_ALL 0xfffffff +#ifndef xs_countof +#define xs_countof(a) (sizeof((a)) / sizeof((*a))) +#endif + void *xs_free(void *ptr); void *_xs_realloc(void *ptr, size_t size, const char *file, int line, const char *func); #define xs_realloc(ptr, size) _xs_realloc(ptr, size, __FILE__, __LINE__, __FUNCTION__) |