summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index a13c4fd3b..8549296d7 100644
--- a/dive.h
+++ b/dive.h
@@ -29,6 +29,11 @@ static inline int same_string(const char *a, const char *b)
return !strcmp(a ?: "", b ?: "");
}
+static inline char *copy_string(const char *s)
+{
+ return s ? strdup(s) : NULL;
+}
+
#include <libxml/tree.h>
#include <libxslt/transform.h>