From 5334e2819d769c5992dae2c07a999b90e26db308 Mon Sep 17 00:00:00 2001 From: Rich Gillam <62772518+richgillam@users.noreply.github.com> Date: Mon, 29 Aug 2022 15:05:22 -0700 Subject: [PATCH] ICU-21958 ICU 70 API Promotions --- icu4c/source/common/unicode/uchar.h | 22 +++++++------------ icu4c/source/common/unicode/uniset.h | 4 +--- icu4c/source/common/unicode/uset.h | 8 ++----- icu4c/source/common/unicode/usetiter.h | 4 +--- .../i18n/unicode/numberrangeformatter.h | 4 +--- icu4c/source/i18n/unicode/udat.h | 6 ++--- icu4c/source/i18n/unicode/uformattedvalue.h | 4 +--- 7 files changed, 16 insertions(+), 36 deletions(-) diff --git a/icu4c/source/common/unicode/uchar.h b/icu4c/source/common/unicode/uchar.h index 4df11a0558b7..6bb68e62a9d7 100644 --- a/icu4c/source/common/unicode/uchar.h +++ b/icu4c/source/common/unicode/uchar.h @@ -483,57 +483,55 @@ typedef enum UProperty { * @stable ICU 62 */ UCHAR_EXTENDED_PICTOGRAPHIC=64, -#ifndef U_HIDE_DRAFT_API /** * Binary property of strings Basic_Emoji. * See https://www.unicode.org/reports/tr51/#Emoji_Sets * - * @draft ICU 70 + * @stable ICU 70 */ UCHAR_BASIC_EMOJI=65, /** * Binary property of strings Emoji_Keycap_Sequence. * See https://www.unicode.org/reports/tr51/#Emoji_Sets * - * @draft ICU 70 + * @stable ICU 70 */ UCHAR_EMOJI_KEYCAP_SEQUENCE=66, /** * Binary property of strings RGI_Emoji_Modifier_Sequence. * See https://www.unicode.org/reports/tr51/#Emoji_Sets * - * @draft ICU 70 + * @stable ICU 70 */ UCHAR_RGI_EMOJI_MODIFIER_SEQUENCE=67, /** * Binary property of strings RGI_Emoji_Flag_Sequence. * See https://www.unicode.org/reports/tr51/#Emoji_Sets * - * @draft ICU 70 + * @stable ICU 70 */ UCHAR_RGI_EMOJI_FLAG_SEQUENCE=68, /** * Binary property of strings RGI_Emoji_Tag_Sequence. * See https://www.unicode.org/reports/tr51/#Emoji_Sets * - * @draft ICU 70 + * @stable ICU 70 */ UCHAR_RGI_EMOJI_TAG_SEQUENCE=69, /** * Binary property of strings RGI_Emoji_ZWJ_Sequence. * See https://www.unicode.org/reports/tr51/#Emoji_Sets * - * @draft ICU 70 + * @stable ICU 70 */ UCHAR_RGI_EMOJI_ZWJ_SEQUENCE=70, /** * Binary property of strings RGI_Emoji. * See https://www.unicode.org/reports/tr51/#Emoji_Sets * - * @draft ICU 70 + * @stable ICU 70 */ UCHAR_RGI_EMOJI=71, -#endif // U_HIDE_DRAFT_API #ifndef U_HIDE_DEPRECATED_API /** * One more than the last constant for binary Unicode properties. @@ -2697,8 +2695,6 @@ typedef enum UVerticalOrientation { U_CAPI UBool U_EXPORT2 u_hasBinaryProperty(UChar32 c, UProperty which); -#ifndef U_HIDE_DRAFT_API - /** * Returns true if the property is true for the string. * Same as u_hasBinaryProperty(single code point, which) @@ -2721,13 +2717,11 @@ u_hasBinaryProperty(UChar32 c, UProperty which); * @see u_getBinaryPropertySet * @see u_getIntPropertyValue * @see u_getUnicodeVersion - * @draft ICU 70 + * @stable ICU 70 */ U_CAPI UBool U_EXPORT2 u_stringHasBinaryProperty(const UChar *s, int32_t length, UProperty which); -#endif // U_HIDE_DRAFT_API - /** * Returns a frozen USet for a binary property. * The library retains ownership over the returned object. diff --git a/icu4c/source/common/unicode/uniset.h b/icu4c/source/common/unicode/uniset.h index 0c29b67cf42e..33e35c4def8c 100644 --- a/icu4c/source/common/unicode/uniset.h +++ b/icu4c/source/common/unicode/uniset.h @@ -794,13 +794,11 @@ class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter { */ virtual UBool isEmpty(void) const; -#ifndef U_HIDE_DRAFT_API /** * @return true if this set contains multi-character strings or the empty string. - * @draft ICU 70 + * @stable ICU 70 */ UBool hasStrings() const; -#endif // U_HIDE_DRAFT_API /** * Returns true if this set contains the given character. diff --git a/icu4c/source/common/unicode/uset.h b/icu4c/source/common/unicode/uset.h index 33332f2d3624..5dd890e148d0 100644 --- a/icu4c/source/common/unicode/uset.h +++ b/icu4c/source/common/unicode/uset.h @@ -850,15 +850,13 @@ uset_removeAllStrings(USet* set); U_CAPI UBool U_EXPORT2 uset_isEmpty(const USet* set); -#ifndef U_HIDE_DRAFT_API /** * @param set the set * @return true if this set contains multi-character strings or the empty string. - * @draft ICU 70 + * @stable ICU 70 */ U_CAPI UBool U_EXPORT2 uset_hasStrings(const USet *set); -#endif // U_HIDE_DRAFT_API /** * Returns true if the given USet contains the given character. @@ -941,18 +939,16 @@ uset_charAt(const USet* set, int32_t charIndex); U_CAPI int32_t U_EXPORT2 uset_size(const USet* set); -#ifndef U_HIDE_DRAFT_API /** * @param set the set * @return the number of ranges in this set. - * @draft ICU 70 + * @stable ICU 70 * @see uset_getItemCount * @see uset_getItem * @see uset_size */ U_CAPI int32_t U_EXPORT2 uset_getRangeCount(const USet *set); -#endif // U_HIDE_DRAFT_API /** * Returns the number of items in this set. An item is either a range diff --git a/icu4c/source/common/unicode/usetiter.h b/icu4c/source/common/unicode/usetiter.h index 5834c308e414..34992d94b7f7 100644 --- a/icu4c/source/common/unicode/usetiter.h +++ b/icu4c/source/common/unicode/usetiter.h @@ -164,14 +164,13 @@ class U_COMMON_API UnicodeSetIterator U_FINAL : public UObject { */ const UnicodeString& getString(); -#ifndef U_HIDE_DRAFT_API /** * Skips over the remaining code points/ranges, if any. * A following call to next() or nextRange() will yield a string, if there is one. * No-op if next() would return false, or if it would yield a string anyway. * * @return *this - * @draft ICU 70 + * @stable ICU 70 * @see UnicodeSet#strings() */ inline UnicodeSetIterator &skipToStrings() { @@ -181,7 +180,6 @@ class U_COMMON_API UnicodeSetIterator U_FINAL : public UObject { nextElement = 0; return *this; } -#endif // U_HIDE_DRAFT_API /** * Advances the iteration position to the next element in the set, diff --git a/icu4c/source/i18n/unicode/numberrangeformatter.h b/icu4c/source/i18n/unicode/numberrangeformatter.h index be0f4db0ce27..7f535952d2f0 100644 --- a/icu4c/source/i18n/unicode/numberrangeformatter.h +++ b/icu4c/source/i18n/unicode/numberrangeformatter.h @@ -639,14 +639,12 @@ class U_I18N_API FormattedNumberRange : public UMemory, public FormattedValue { */ UNumberRangeIdentityResult getIdentityResult(UErrorCode& status) const; -#ifndef U_HIDE_DRAFT_API /** * Default constructor; makes an empty FormattedNumberRange. - * @draft ICU 70 + * @stable ICU 70 */ FormattedNumberRange() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {} -#endif /* U_HIDE_DRAFT_API */ /** * Copying not supported; use move constructor instead. diff --git a/icu4c/source/i18n/unicode/udat.h b/icu4c/source/i18n/unicode/udat.h index 0e6e6b76daa3..3823dc88c4fa 100644 --- a/icu4c/source/i18n/unicode/udat.h +++ b/icu4c/source/i18n/unicode/udat.h @@ -1532,19 +1532,17 @@ typedef enum UDateFormatSymbolType { */ UDAT_ZODIAC_NAMES_NARROW, -#ifndef U_HIDE_DRAFT_API /** * The narrow quarter names, for example 1 - * @draft ICU 70 + * @stable ICU 70 */ UDAT_NARROW_QUARTERS, /** * The narrow standalone quarter names, for example 1 - * @draft ICU 70 + * @stable ICU 70 */ UDAT_STANDALONE_NARROW_QUARTERS -#endif // U_HIDE_DRAFT_API } UDateFormatSymbolType; struct UDateFormatSymbols; diff --git a/icu4c/source/i18n/unicode/uformattedvalue.h b/icu4c/source/i18n/unicode/uformattedvalue.h index 1a550e87589c..af6d18f3bc99 100644 --- a/icu4c/source/i18n/unicode/uformattedvalue.h +++ b/icu4c/source/i18n/unicode/uformattedvalue.h @@ -93,14 +93,12 @@ typedef enum UFieldCategory { */ UFIELD_CATEGORY_DATE_INTERVAL_SPAN = 0x1000 + UFIELD_CATEGORY_DATE_INTERVAL, -#ifndef U_HIDE_DRAFT_API /** * Category for spans in a number range. * - * @draft ICU 69 + * @stable ICU 69 */ UFIELD_CATEGORY_NUMBER_RANGE_SPAN = 0x1000 + UFIELD_CATEGORY_NUMBER, -#endif // U_HIDE_DRAFT_API } UFieldCategory;