projects
/
libexpat
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cf316f
)
Add wrapper macro to give string literals the right type for XML_Char*
author
Rhodri James
<rhodri@kynesim.co.uk>
Fri, 4 Aug 2017 17:14:30 +0000
(18:14 +0100)
committer
Sebastian Pipping
<sebastian@pipping.org>
Tue, 29 Aug 2017 20:30:32 +0000
(22:30 +0200)
expat/tests/runtests.c
patch
|
blob
|
history
diff --git
a/expat/tests/runtests.c
b/expat/tests/runtests.c
index 90b27192abdcfb202d91dba439f125af790ae491..06c1ed20022343410a633caf35c29327e44adc58 100644
(file)
--- 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 */