From 5723e1696ef0199723ec08e34ad7a011e3ba2f48 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Sun, 12 Jan 2014 14:50:48 -0500 Subject: [PATCH] Bug 958497 - Use the correct character type in th_char.h depending on the language to use; r=smontagu --- intl/lwbrk/src/th_char.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/intl/lwbrk/src/th_char.h b/intl/lwbrk/src/th_char.h index cb710fc21573..05a969b83ced 100644 --- a/intl/lwbrk/src/th_char.h +++ b/intl/lwbrk/src/th_char.h @@ -16,7 +16,15 @@ purpose. It is provided "as is" without express or implied warranty. typedef unsigned char tis_char; #ifdef TH_UNICODE +/* + * The char16_t type is only usable in C++ code, so we need this ugly hack to + * select a binary compatible C type for the expat C code to use. + */ +#ifdef __cplusplus typedef char16_t th_char; +#else +typedef uint16_t th_char; +#endif #define TH_THAIBEGIN_ 0x0e00 #define th_isthai(c) (0x0e00 <= (c) && (c) <= 0x0e5f) #else