diff options
author | Mike Frysinger <vapier@chromium.org> | 2019-08-03 12:12:40 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@chromium.org> | 2019-09-04 20:25:23 +0000 |
commit | db1cda26539c711c3da7ed4d410dfe8190e89b8f (patch) | |
tree | ece5c30abb27e436ada9a0b2a07a08a7eb7da938 /src/common/convert_UTF.h | |
parent | codereview.settings: do not force squashing behavior (diff) | |
download | breakpad-db1cda26539c711c3da7ed4d410dfe8190e89b8f.tar.xz |
convert_UTF: rewrite in C++
This allows us to namespace the symbols properly.
Bug: google-breakpad:725
Change-Id: Iea8052547eef6c0acb299c1995781735c6d8994f
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1769236
Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/common/convert_UTF.h')
-rw-r--r-- | src/common/convert_UTF.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/common/convert_UTF.h b/src/common/convert_UTF.h index 644d0995..2f69495d 100644 --- a/src/common/convert_UTF.h +++ b/src/common/convert_UTF.h @@ -106,6 +106,8 @@ All should be unsigned values to avoid sign extension during bit mask & shift operations. ------------------------------------------------------------------------ */ +namespace google_breakpad { + typedef unsigned long UTF32; /* at least 32 bits */ typedef unsigned short UTF16; /* at least 16 bits */ typedef unsigned char UTF8; /* typically 8 bits */ @@ -130,11 +132,6 @@ typedef enum { lenientConversion } ConversionFlags; -/* This is for C++ and does no harm in C */ -#ifdef __cplusplus -extern "C" { -#endif - ConversionResult ConvertUTF8toUTF16 (const UTF8** sourceStart, const UTF8* sourceEnd, UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); @@ -155,9 +152,7 @@ ConversionResult ConvertUTF32toUTF16 (const UTF32** sourceStart, const UTF32* so Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd); -#ifdef __cplusplus -} -#endif +} // namespace google_breakpad /* --------------------------------------------------------------------- */ |