aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 3b6909d..faa73c9 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1,4 +1,5 @@
#include <ctype.h>
+#include <stdlib.h>
#include <string.h>
#include <util.h>
@@ -25,3 +26,11 @@ trim(char *s)
{
return rtrim(ltrim(s));
}
+
+ptr_wrapper_t *
+wrap_ptr(void *ptr)
+{
+ ptr_wrapper_t *wrapper = malloc(sizeof(ptr_wrapper_t));
+ wrapper->ptr = ptr;
+ return wrapper;
+}