aboutsummaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 1819c75..628492e 100644
--- a/utils.h
+++ b/utils.h
@@ -20,6 +20,10 @@
__expr; \
})
+#ifndef public
+#define public __attribute__ ((visibility ("default")))
+#endif
+
#define new(t) require(calloc(1, sizeof(t)), "`new(" #t ")` allocation failure")
#define checked_strdup(s) require(strdup(s), "`checked_strdup(" #s ")` allocation failure")
#define grow(arr,n) require(realloc(arr,sizeof(arr[0])*(n)), "`grow(" #arr ", " #n ")` allocation failure")