diff options
| author | 2024-04-14 19:26:49 +0200 | |
|---|---|---|
| committer | 2024-04-14 19:26:49 +0200 | |
| commit | 0275658a3602f74035ff776dac8d8f64b9a2794f (patch) | |
| tree | d9489684e46d7cd0d5bd8347a880316abe22f48f /xs.h | |
| parent | Better redirection URL building in oauth_post_handler(). (diff) | |
| download | penes-snac2-0275658a3602f74035ff776dac8d8f64b9a2794f.tar.gz penes-snac2-0275658a3602f74035ff776dac8d8f64b9a2794f.tar.xz penes-snac2-0275658a3602f74035ff776dac8d8f64b9a2794f.zip | |
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; | |||
| 45 | /* not really all, just very much */ | 45 | /* not really all, just very much */ |
| 46 | #define XS_ALL 0xfffffff | 46 | #define XS_ALL 0xfffffff |
| 47 | 47 | ||
| 48 | #ifndef xs_countof | ||
| 49 | #define xs_countof(a) (sizeof((a)) / sizeof((*a))) | ||
| 50 | #endif | ||
| 51 | |||
| 48 | void *xs_free(void *ptr); | 52 | void *xs_free(void *ptr); |
| 49 | void *_xs_realloc(void *ptr, size_t size, const char *file, int line, const char *func); | 53 | void *_xs_realloc(void *ptr, size_t size, const char *file, int line, const char *func); |
| 50 | #define xs_realloc(ptr, size) _xs_realloc(ptr, size, __FILE__, __LINE__, __FUNCTION__) | 54 | #define xs_realloc(ptr, size) _xs_realloc(ptr, size, __FILE__, __LINE__, __FUNCTION__) |