From 91a7fffd5637574aea7a1b52308968a99dee888c Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 22 Jan 2017 15:58:49 +0000 Subject: nsurl: Tidy up component helper macros. --- utils/nsurl/private.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'utils/nsurl/private.h') 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 -- cgit v1.2.3