From: Rhodri James Date: Fri, 4 Aug 2017 17:14:30 +0000 (+0100) Subject: Add wrapper macro to give string literals the right type for XML_Char* X-Git-Tag: R_2_2_5~24^2~124 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e11b393111f8bff18d9e836c80df478ce33dea1;p=libexpat Add wrapper macro to give string literals the right type for XML_Char* --- diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 90b27192..06c1ed20 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -76,6 +76,8 @@ #define xcstrlen(s) wcslen(s) #define xcstrcmp(s, t) wcscmp((s), (t)) #define xcstrncmp(s, t, n) wcsncmp((s), (t), (n)) +#define XCS(s) _XCS(s) +#define _XCS(s) L ## s #else #ifdef XML_UNICODE #error "No support for UTF-16 character without wchar_t in tests" @@ -85,6 +87,7 @@ #define xcstrlen(s) strlen(s) #define xcstrcmp(s, t) strcmp((s), (t)) #define xcstrncmp(s, t, n) strncmp((s), (t), (n)) +#define XCS(s) s #endif /* XML_UNICODE */ #endif /* XML_UNICODE_WCHAR_T */