From c3d191321b2382ee659d5709a67d852cb18d0e1a Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Thu, 28 Jul 2011 18:48:08 +0000 Subject: [PATCH] ICU-8575 move U_SENTINEL from utf.h to umachine.h (next to UChar32) so that just using U_SENTINEL does not require including utf.h X-SVN-Rev: 30441 --- icu4c/source/common/unicode/umachine.h | 20 ++++++++++++++++++++ icu4c/source/common/unicode/utf.h | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/icu4c/source/common/unicode/umachine.h b/icu4c/source/common/unicode/umachine.h index cd742ec43ba..a8c8cc035a2 100644 --- a/icu4c/source/common/unicode/umachine.h +++ b/icu4c/source/common/unicode/umachine.h @@ -297,6 +297,26 @@ typedef int8_t UBool; */ typedef int32_t UChar32; +/** + * This value is intended for sentinel values for APIs that + * (take or) return single code points (UChar32). + * It is outside of the Unicode code point range 0..0x10ffff. + * + * For example, a "done" or "error" value in a new API + * could be indicated with U_SENTINEL. + * + * ICU APIs designed before ICU 2.4 usually define service-specific "done" + * values, mostly 0xffff. + * Those may need to be distinguished from + * actual U+ffff text contents by calling functions like + * CharacterIterator::hasNext() or UnicodeString::length(). + * + * @return -1 + * @see UChar32 + * @stable ICU 2.4 + */ +#define U_SENTINEL (-1) + #include "unicode/urename.h" #endif diff --git a/icu4c/source/common/unicode/utf.h b/icu4c/source/common/unicode/utf.h index 2f646013be0..f5954fe9fe6 100644 --- a/icu4c/source/common/unicode/utf.h +++ b/icu4c/source/common/unicode/utf.h @@ -116,26 +116,6 @@ /* single-code point definitions -------------------------------------------- */ -/** - * This value is intended for sentinel values for APIs that - * (take or) return single code points (UChar32). - * It is outside of the Unicode code point range 0..0x10ffff. - * - * For example, a "done" or "error" value in a new API - * could be indicated with U_SENTINEL. - * - * ICU APIs designed before ICU 2.4 usually define service-specific "done" - * values, mostly 0xffff. - * Those may need to be distinguished from - * actual U+ffff text contents by calling functions like - * CharacterIterator::hasNext() or UnicodeString::length(). - * - * @return -1 - * @see UChar32 - * @stable ICU 2.4 - */ -#define U_SENTINEL (-1) - /** * Is this code point a Unicode noncharacter? * @param c 32-bit code point -- 2.40.0