summaryrefslogtreecommitdiff
path: root/utils/nsurl/private.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2017-01-22 15:58:49 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2017-02-08 17:27:13 +0000
commit91a7fffd5637574aea7a1b52308968a99dee888c (patch)
tree8ddeeb41fb089945ac6aee9776e1ca23895402e1 /utils/nsurl/private.h
parent2acd90e28a37a80f20e2780be7972764c699d9a0 (diff)
downloadnetsurf-91a7fffd5637574aea7a1b52308968a99dee888c.tar.gz
netsurf-91a7fffd5637574aea7a1b52308968a99dee888c.tar.bz2
nsurl: Tidy up component helper macros.
Diffstat (limited to 'utils/nsurl/private.h')
-rw-r--r--utils/nsurl/private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/nsurl/private.h b/utils/nsurl/private.h
index bc3eb8c7e..a5291af21 100644
--- a/utils/nsurl/private.h
+++ b/utils/nsurl/private.h
@@ -107,6 +107,11 @@ enum nsurl_string_flags {
NSURL_F_FRAGMENT = (1 << 11)
};
+/**
+ * NULL-safe lwc_string_ref
+ */
+#define nsurl__component_copy(c) (c == NULL) ? NULL : lwc_string_ref(c)
+
/**
* Convert a set of nsurl components to a single string