summaryrefslogtreecommitdiff
path: root/xs.h
diff options
context:
space:
mode:
authorGravatar default2024-04-14 19:26:49 +0200
committerGravatar default2024-04-14 19:26:49 +0200
commit0275658a3602f74035ff776dac8d8f64b9a2794f (patch)
treed9489684e46d7cd0d5bd8347a880316abe22f48f /xs.h
parentBetter redirection URL building in oauth_post_handler(). (diff)
downloadpenes-snac2-0275658a3602f74035ff776dac8d8f64b9a2794f.tar.gz
penes-snac2-0275658a3602f74035ff776dac8d8f64b9a2794f.tar.xz
penes-snac2-0275658a3602f74035ff776dac8d8f64b9a2794f.zip
Backport from xs.
Diffstat (limited to '')
-rw-r--r--xs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/xs.h b/xs.h
index d2de44a..bab315a 100644
--- a/xs.h
+++ b/xs.h
@@ -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
48void *xs_free(void *ptr); 52void *xs_free(void *ptr);
49void *_xs_realloc(void *ptr, size_t size, const char *file, int line, const char *func); 53void *_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__)