From 36eed24f5fd8ff0edf023bef90a64e24e2dc012f Mon Sep 17 00:00:00 2001 From: Peter Edberg Date: Wed, 29 Mar 2017 04:44:37 +0000 Subject: [PATCH] ICU-13005 ICU 59rc BRS, finish cleanup of C status tags and U_HIDE_ conditionals X-SVN-Rev: 39952 --- icu4c/source/common/unicode/char16ptr.h | 4 +++ icu4c/source/common/unicode/unistr.h | 36 ++++++++++++++++++++++++ icu4c/source/i18n/unicode/ucal.h | 4 +-- icu4c/source/i18n/unicode/ucol.h | 10 +++---- icu4c/source/i18n/unicode/udat.h | 6 ++-- icu4c/source/i18n/unicode/udatpg.h | 4 +-- icu4c/source/i18n/unicode/uformattable.h | 2 +- icu4c/source/i18n/unicode/ulocdata.h | 6 ++-- icu4c/source/i18n/unicode/unum.h | 10 +++---- icu4c/source/i18n/unicode/upluralrules.h | 2 +- icu4c/source/i18n/unicode/uregion.h | 2 +- icu4c/source/i18n/unicode/ureldatefmt.h | 6 ++-- icu4c/source/i18n/unicode/usearch.h | 4 +-- icu4c/source/i18n/unicode/utmscale.h | 7 +++++ 14 files changed, 75 insertions(+), 28 deletions(-) diff --git a/icu4c/source/common/unicode/char16ptr.h b/icu4c/source/common/unicode/char16ptr.h index 4c1a3528eba..fa17c62446c 100644 --- a/icu4c/source/common/unicode/char16ptr.h +++ b/icu4c/source/common/unicode/char16ptr.h @@ -30,6 +30,8 @@ U_NAMESPACE_BEGIN # define U_ALIASING_BARRIER(ptr) asm volatile("" : : "rm"(ptr) : "memory") #endif +// Do not use #ifndef U_HIDE_DRAFT_API for the following class, it +// is now used in place of UChar* in several stable C++ methods /** * char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types. * @draft ICU 59 @@ -135,6 +137,8 @@ char16_t *Char16Ptr::get() const { return u.cp; } #endif +// Do not use #ifndef U_HIDE_DRAFT_API for the following class, it is +// now used in place of const UChar* in several stable C++ methods /** * const char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types. * @draft ICU 59 diff --git a/icu4c/source/common/unicode/unistr.h b/icu4c/source/common/unicode/unistr.h index 428793f17c8..e0ab0b9eb7c 100644 --- a/icu4c/source/common/unicode/unistr.h +++ b/icu4c/source/common/unicode/unistr.h @@ -3006,6 +3006,10 @@ public: */ UNISTR_FROM_STRING_EXPLICIT UnicodeString(const char16_t *text); + /* + * Do not use #ifndef U_HIDE_DRAFT_API for the following constructor, + * it should always be available regardless of U_HIDE_DRAFT_API status + */ #if !U_CHAR16_IS_TYPEDEF /** * uint16_t * constructor. @@ -3021,6 +3025,10 @@ public: UnicodeString(ConstChar16Ptr(text)) {} #endif + /* + * Do not use #ifndef U_HIDE_DRAFT_API for the following constructor, + * it should always be available regardless of U_HIDE_DRAFT_API status + */ #if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) /** * wchar_t * constructor. @@ -3037,6 +3045,10 @@ public: UnicodeString(ConstChar16Ptr(text)) {} #endif + /* + * Do not use #ifndef U_HIDE_DRAFT_API for the following constructor, + * it should always be available regardless of U_HIDE_DRAFT_API status + */ /** * nullptr_t constructor. * Effectively the same as the default constructor, makes an empty string object. @@ -3059,6 +3071,10 @@ public: UnicodeString(const char16_t *text, int32_t textLength); + /* + * Do not use #ifndef U_HIDE_DRAFT_API for the following constructor, + * it should always be available regardless of U_HIDE_DRAFT_API status + */ #if !U_CHAR16_IS_TYPEDEF /** * uint16_t * constructor. @@ -3071,6 +3087,10 @@ public: UnicodeString(ConstChar16Ptr(text), length) {} #endif + /* + * Do not use #ifndef U_HIDE_DRAFT_API for the following constructor, + * it should always be available regardless of U_HIDE_DRAFT_API status + */ #if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) /** * wchar_t * constructor. @@ -3084,6 +3104,10 @@ public: UnicodeString(ConstChar16Ptr(text), length) {} #endif + /* + * Do not use #ifndef U_HIDE_DRAFT_API for the following constructor, + * it should always be available regardless of U_HIDE_DRAFT_API status + */ /** * nullptr_t constructor. * Effectively the same as the default constructor, makes an empty string object. @@ -3139,6 +3163,10 @@ public: */ UnicodeString(char16_t *buffer, int32_t buffLength, int32_t buffCapacity); + /* + * Do not use #ifndef U_HIDE_DRAFT_API for the following constructor, + * it should always be available regardless of U_HIDE_DRAFT_API status + */ #if !U_CHAR16_IS_TYPEDEF /** * Writable-aliasing uint16_t * constructor. @@ -3152,6 +3180,10 @@ public: UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {} #endif + /* + * Do not use #ifndef U_HIDE_DRAFT_API for the following constructor, + * it should always be available regardless of U_HIDE_DRAFT_API status + */ #if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) /** * Writable-aliasing wchar_t * constructor. @@ -3166,6 +3198,10 @@ public: UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {} #endif + /* + * Do not use #ifndef U_HIDE_DRAFT_API for the following constructor, + * it should always be available regardless of U_HIDE_DRAFT_API status + */ /** * Writable-aliasing nullptr_t constructor. * Effectively the same as the default constructor, makes an empty string object. diff --git a/icu4c/source/i18n/unicode/ucal.h b/icu4c/source/i18n/unicode/ucal.h index ac857d3d814..c765e7859f5 100644 --- a/icu4c/source/i18n/unicode/ucal.h +++ b/icu4c/source/i18n/unicode/ucal.h @@ -425,8 +425,8 @@ enum UCalendarDateFields { */ UCAL_IS_LEAP_MONTH, - // Do not conditionalize with #ifndef U_HIDE_DEPRECATED_API, - // it is needed for layout of Calendar, DateFormat, and other objects + /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, + * it is needed for layout of Calendar, DateFormat, and other objects */ /** * One more than the highest normal UCalendarDateFields value. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. diff --git a/icu4c/source/i18n/unicode/ucol.h b/icu4c/source/i18n/unicode/ucol.h index 1f908d239e0..ecabd9e09b9 100644 --- a/icu4c/source/i18n/unicode/ucol.h +++ b/icu4c/source/i18n/unicode/ucol.h @@ -131,7 +131,7 @@ typedef enum { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ UCOL_ATTRIBUTE_VALUE_COUNT -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } UColAttributeValue; /** @@ -204,7 +204,7 @@ typedef enum { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ UCOL_REORDER_CODE_LIMIT = 0x1005 -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } UColReorderCode; /** @@ -342,8 +342,8 @@ typedef enum { */ UCOL_NUMERIC_COLLATION = UCOL_STRENGTH + 2, - // Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, - // it is needed for layout of RuleBasedCollator object. + /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, + * it is needed for layout of RuleBasedCollator object. */ /** * One more than the highest normal UColAttribute value. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. @@ -1067,7 +1067,7 @@ typedef enum { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ UCOL_BOUND_VALUE_COUNT -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } UColBoundMode; /** diff --git a/icu4c/source/i18n/unicode/udat.h b/icu4c/source/i18n/unicode/udat.h index 01a50ac17b2..90aff20df2a 100644 --- a/icu4c/source/i18n/unicode/udat.h +++ b/icu4c/source/i18n/unicode/udat.h @@ -795,7 +795,7 @@ typedef enum UDateFormatField { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ UDAT_FIELD_COUNT = 38 -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } UDateFormatField; @@ -900,8 +900,8 @@ typedef enum UDateFormatBooleanAttribute { */ UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3, - // Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, - // it is needed for layout of DateFormat object. + /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, + * it is needed for layout of DateFormat object. */ /** * One more than the highest normal UDateFormatBooleanAttribute value. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. diff --git a/icu4c/source/i18n/unicode/udatpg.h b/icu4c/source/i18n/unicode/udatpg.h index e0e73ed2b59..76baa3da589 100644 --- a/icu4c/source/i18n/unicode/udatpg.h +++ b/icu4c/source/i18n/unicode/udatpg.h @@ -86,8 +86,8 @@ typedef enum UDateTimePatternField { /** @stable ICU 3.8 */ UDATPG_ZONE_FIELD, - // Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, - // it is needed for layout of DateTimePatternGenerator object. + /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, + * it is needed for layout of DateTimePatternGenerator object. */ /** * One more than the highest normal UDateTimePatternField value. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. diff --git a/icu4c/source/i18n/unicode/uformattable.h b/icu4c/source/i18n/unicode/uformattable.h index d5d80ddc422..9ba2a36901a 100644 --- a/icu4c/source/i18n/unicode/uformattable.h +++ b/icu4c/source/i18n/unicode/uformattable.h @@ -57,7 +57,7 @@ typedef enum UFormattableType { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ UFMT_COUNT -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } UFormattableType; diff --git a/icu4c/source/i18n/unicode/ulocdata.h b/icu4c/source/i18n/unicode/ulocdata.h index 14410ebb849..de8d8539c67 100644 --- a/icu4c/source/i18n/unicode/ulocdata.h +++ b/icu4c/source/i18n/unicode/ulocdata.h @@ -55,7 +55,7 @@ typedef enum ULocaleDataExemplarSetType { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ ULOCDATA_ES_COUNT=4 -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } ULocaleDataExemplarSetType; /** The possible types of delimiters. @@ -76,7 +76,7 @@ typedef enum ULocaleDataDelimiterType { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ ULOCDATA_DELIMITER_COUNT = 4 -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } ULocaleDataDelimiterType; /** @@ -207,7 +207,7 @@ typedef enum UMeasurementSystem { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ UMS_LIMIT -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } UMeasurementSystem; /** diff --git a/icu4c/source/i18n/unicode/unum.h b/icu4c/source/i18n/unicode/unum.h index 7da09b0adfd..065ce49c93f 100644 --- a/icu4c/source/i18n/unicode/unum.h +++ b/icu4c/source/i18n/unicode/unum.h @@ -250,7 +250,7 @@ typedef enum UNumberFormatStyle { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ UNUM_FORMAT_STYLE_COUNT=17, -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ /** * Default format @@ -327,8 +327,8 @@ enum UCurrencySpacing { /** @stable ICU 4.8 */ UNUM_CURRENCY_INSERT, - // Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, - // it is needed for layout of DecimalFormatSymbols object. + /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API, + * it is needed for layout of DecimalFormatSymbols object. */ /** * One more than the highest normal UCurrencySpacing value. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. @@ -372,7 +372,7 @@ typedef enum UNumberFormatFields { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ UNUM_FIELD_COUNT -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } UNumberFormatFields; @@ -1345,7 +1345,7 @@ typedef enum UNumberFormatSymbol { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ UNUM_FORMAT_SYMBOL_COUNT = 28 -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } UNumberFormatSymbol; /** diff --git a/icu4c/source/i18n/unicode/upluralrules.h b/icu4c/source/i18n/unicode/upluralrules.h index 25a0dcd9d6d..99d93a4e051 100644 --- a/icu4c/source/i18n/unicode/upluralrules.h +++ b/icu4c/source/i18n/unicode/upluralrules.h @@ -64,7 +64,7 @@ enum UPluralType { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ UPLURAL_TYPE_COUNT -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ }; /** * @stable ICU 50 diff --git a/icu4c/source/i18n/unicode/uregion.h b/icu4c/source/i18n/unicode/uregion.h index 39ef3291316..a5de49674b5 100644 --- a/icu4c/source/i18n/unicode/uregion.h +++ b/icu4c/source/i18n/unicode/uregion.h @@ -113,7 +113,7 @@ typedef enum URegionType { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ URGN_LIMIT -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } URegionType; #if !UCONFIG_NO_FORMATTING diff --git a/icu4c/source/i18n/unicode/ureldatefmt.h b/icu4c/source/i18n/unicode/ureldatefmt.h index e0fa0215ba9..0fde188d0f4 100644 --- a/icu4c/source/i18n/unicode/ureldatefmt.h +++ b/icu4c/source/i18n/unicode/ureldatefmt.h @@ -66,7 +66,7 @@ typedef enum UDateRelativeDateTimeFormatterStyle { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ UDAT_STYLE_COUNT -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } UDateRelativeDateTimeFormatterStyle; /** @@ -171,7 +171,7 @@ typedef enum URelativeDateTimeUnit { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ UDAT_REL_UNIT_COUNT -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } URelativeDateTimeUnit; /** @@ -179,7 +179,7 @@ typedef enum URelativeDateTimeUnit { * @stable ICU 57 */ struct URelativeDateTimeFormatter; -typedef struct URelativeDateTimeFormatter URelativeDateTimeFormatter; /**< C typedef for struct URelativeDateTimeFormatter. @draft ICU 57 */ +typedef struct URelativeDateTimeFormatter URelativeDateTimeFormatter; /**< C typedef for struct URelativeDateTimeFormatter. @stable ICU 57 */ /** diff --git a/icu4c/source/i18n/unicode/usearch.h b/icu4c/source/i18n/unicode/usearch.h index cd1319f067a..ebfcdf7ec6a 100644 --- a/icu4c/source/i18n/unicode/usearch.h +++ b/icu4c/source/i18n/unicode/usearch.h @@ -196,7 +196,7 @@ typedef enum { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ USEARCH_ATTRIBUTE_COUNT = 3 -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } USearchAttribute; /** @@ -272,7 +272,7 @@ typedef enum { * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ USEARCH_ATTRIBUTE_VALUE_COUNT -#endif // U_HIDE_DEPRECATED_API +#endif /* U_HIDE_DEPRECATED_API */ } USearchAttributeValue; /* open and close ------------------------------------------------------ */ diff --git a/icu4c/source/i18n/unicode/utmscale.h b/icu4c/source/i18n/unicode/utmscale.h index 4e46def9016..d8b8a2e668a 100644 --- a/icu4c/source/i18n/unicode/utmscale.h +++ b/icu4c/source/i18n/unicode/utmscale.h @@ -283,10 +283,14 @@ typedef enum UDateTimeScale { */ UDTS_UNIX_MICROSECONDS_TIME, +#ifndef U_HIDE_DEPRECATED_API /** * The first unused time scale value. The limit of this enum + * @deprecated ICU 59 The numeric value may change over time, see ICU ticket #12420. */ UDTS_MAX_SCALE +#endif /* U_HIDE_DEPRECATED_API */ + } UDateTimeScale; /** @@ -423,12 +427,15 @@ typedef enum UTimeScaleValue { #endif /* U_HIDE_INTERNAL_API */ +#ifndef U_HIDE_DEPRECATED_API /** * The number of time scale values, in other words limit of this enum. * * @see utmscale_getTimeScaleValue + * @deprecated ICU 59 The numeric value may change over time, see ICU ticket #12420. */ UTSV_MAX_SCALE_VALUE=11 +#endif /* U_HIDE_DEPRECATED_API */ } UTimeScaleValue; -- 2.40.0