From c03a13dd21047ebcf4f4a1d3b640501b407d7ab3 Mon Sep 17 00:00:00 2001 From: Peter Edberg Date: Thu, 1 Mar 2018 05:54:24 +0000 Subject: [PATCH] ICU-13607 ICU4C 61 API promotion X-SVN-Rev: 41032 --- icu4c/source/common/unicode/casemap.h | 24 +++++----- icu4c/source/common/unicode/char16ptr.h | 44 ++++++++---------- icu4c/source/common/unicode/edits.h | 58 ++++++++++++------------ icu4c/source/common/unicode/ubrk.h | 14 ++---- icu4c/source/common/unicode/umachine.h | 2 +- icu4c/source/common/unicode/unistr.h | 54 ++++------------------ icu4c/source/i18n/unicode/measunit.h | 4 +- icu4c/source/i18n/unicode/unum.h | 6 +-- icu4c/source/i18n/unicode/upluralrules.h | 6 +-- 9 files changed, 80 insertions(+), 132 deletions(-) diff --git a/icu4c/source/common/unicode/casemap.h b/icu4c/source/common/unicode/casemap.h index 4a4917bdcaf..4b77256d742 100644 --- a/icu4c/source/common/unicode/casemap.h +++ b/icu4c/source/common/unicode/casemap.h @@ -18,8 +18,6 @@ U_NAMESPACE_BEGIN -#ifndef U_HIDE_DRAFT_API - class BreakIterator; class ByteSink; class Edits; @@ -27,7 +25,7 @@ class Edits; /** * Low-level C++ case mapping functions. * - * @draft ICU 59 + * @stable ICU 59 */ class U_COMMON_API CaseMap U_FINAL : public UMemory { public: @@ -59,7 +57,7 @@ public: * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. * * @see u_strToLower - * @draft ICU 59 + * @stable ICU 59 */ static int32_t toLower( const char *locale, uint32_t options, @@ -95,7 +93,7 @@ public: * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. * * @see u_strToUpper - * @draft ICU 59 + * @stable ICU 59 */ static int32_t toUpper( const char *locale, uint32_t options, @@ -146,7 +144,7 @@ public: * * @see u_strToTitle * @see ucasemap_toTitle - * @draft ICU 59 + * @stable ICU 59 */ static int32_t toTitle( const char *locale, uint32_t options, BreakIterator *iter, @@ -188,7 +186,7 @@ public: * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. * * @see u_strFoldCase - * @draft ICU 59 + * @stable ICU 59 */ static int32_t fold( uint32_t options, @@ -196,6 +194,7 @@ public: char16_t *dest, int32_t destCapacity, Edits *edits, UErrorCode &errorCode); +#ifndef U_HIDE_DRAFT_API /** * Lowercases a UTF-8 string and optionally records edits. * Casing is locale-dependent and context-sensitive. @@ -318,6 +317,7 @@ public: uint32_t options, StringPiece src, ByteSink &sink, Edits *edits, UErrorCode &errorCode); +#endif // U_HIDE_DRAFT_API /** * Lowercases a UTF-8 string and optionally records edits. @@ -347,7 +347,7 @@ public: * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. * * @see ucasemap_utf8ToLower - * @draft ICU 59 + * @stable ICU 59 */ static int32_t utf8ToLower( const char *locale, uint32_t options, @@ -383,7 +383,7 @@ public: * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. * * @see ucasemap_utf8ToUpper - * @draft ICU 59 + * @stable ICU 59 */ static int32_t utf8ToUpper( const char *locale, uint32_t options, @@ -433,7 +433,7 @@ public: * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. * * @see ucasemap_utf8ToTitle - * @draft ICU 59 + * @stable ICU 59 */ static int32_t utf8ToTitle( const char *locale, uint32_t options, BreakIterator *iter, @@ -475,7 +475,7 @@ public: * the full length is returned and a U_BUFFER_OVERFLOW_ERROR is set. * * @see ucasemap_utf8FoldCase - * @draft ICU 59 + * @stable ICU 59 */ static int32_t utf8Fold( uint32_t options, @@ -489,8 +489,6 @@ private: CaseMap &operator=(const CaseMap &other) = delete; }; -#endif // U_HIDE_DRAFT_API - U_NAMESPACE_END #endif // __CASEMAP_H__ diff --git a/icu4c/source/common/unicode/char16ptr.h b/icu4c/source/common/unicode/char16ptr.h index fbce1775911..49d0e029a93 100644 --- a/icu4c/source/common/unicode/char16ptr.h +++ b/icu4c/source/common/unicode/char16ptr.h @@ -30,25 +30,23 @@ 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 + * @stable ICU 59 */ class U_COMMON_API Char16Ptr U_FINAL { public: /** * Copies the pointer. * @param p pointer - * @draft ICU 59 + * @stable ICU 59 */ inline Char16Ptr(char16_t *p); #if !U_CHAR16_IS_TYPEDEF /** * Converts the pointer to char16_t *. * @param p pointer to be converted - * @draft ICU 59 + * @stable ICU 59 */ inline Char16Ptr(uint16_t *p); #endif @@ -57,32 +55,32 @@ public: * Converts the pointer to char16_t *. * (Only defined if U_SIZEOF_WCHAR_T==2.) * @param p pointer to be converted - * @draft ICU 59 + * @stable ICU 59 */ inline Char16Ptr(wchar_t *p); #endif /** * nullptr constructor. * @param p nullptr - * @draft ICU 59 + * @stable ICU 59 */ inline Char16Ptr(std::nullptr_t p); /** * Destructor. - * @draft ICU 59 + * @stable ICU 59 */ inline ~Char16Ptr(); /** * Pointer access. * @return the wrapped pointer - * @draft ICU 59 + * @stable ICU 59 */ inline char16_t *get() const; /** * char16_t pointer access via type conversion (e.g., static_cast). * @return the wrapped pointer - * @draft ICU 59 + * @stable ICU 59 */ inline operator char16_t *() const { return get(); } @@ -137,25 +135,23 @@ 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 + * @stable ICU 59 */ class U_COMMON_API ConstChar16Ptr U_FINAL { public: /** * Copies the pointer. * @param p pointer - * @draft ICU 59 + * @stable ICU 59 */ inline ConstChar16Ptr(const char16_t *p); #if !U_CHAR16_IS_TYPEDEF /** * Converts the pointer to char16_t *. * @param p pointer to be converted - * @draft ICU 59 + * @stable ICU 59 */ inline ConstChar16Ptr(const uint16_t *p); #endif @@ -164,33 +160,33 @@ public: * Converts the pointer to char16_t *. * (Only defined if U_SIZEOF_WCHAR_T==2.) * @param p pointer to be converted - * @draft ICU 59 + * @stable ICU 59 */ inline ConstChar16Ptr(const wchar_t *p); #endif /** * nullptr constructor. * @param p nullptr - * @draft ICU 59 + * @stable ICU 59 */ inline ConstChar16Ptr(const std::nullptr_t p); /** * Destructor. - * @draft ICU 59 + * @stable ICU 59 */ inline ~ConstChar16Ptr(); /** * Pointer access. * @return the wrapped pointer - * @draft ICU 59 + * @stable ICU 59 */ inline const char16_t *get() const; /** * char16_t pointer access via type conversion (e.g., static_cast). * @return the wrapped pointer - * @draft ICU 59 + * @stable ICU 59 */ inline operator const char16_t *() const { return get(); } @@ -250,7 +246,7 @@ const char16_t *ConstChar16Ptr::get() const { return u_.cp; } * Includes an aliasing barrier if available. * @param p pointer * @return p as const UChar * - * @draft ICU 59 + * @stable ICU 59 */ inline const UChar *toUCharPtr(const char16_t *p) { #ifdef U_ALIASING_BARRIER @@ -264,7 +260,7 @@ inline const UChar *toUCharPtr(const char16_t *p) { * Includes an aliasing barrier if available. * @param p pointer * @return p as UChar * - * @draft ICU 59 + * @stable ICU 59 */ inline UChar *toUCharPtr(char16_t *p) { #ifdef U_ALIASING_BARRIER @@ -278,7 +274,7 @@ inline UChar *toUCharPtr(char16_t *p) { * Includes an aliasing barrier if available. * @param p pointer * @return p as const OldUChar * - * @draft ICU 59 + * @stable ICU 59 */ inline const OldUChar *toOldUCharPtr(const char16_t *p) { #ifdef U_ALIASING_BARRIER @@ -292,7 +288,7 @@ inline const OldUChar *toOldUCharPtr(const char16_t *p) { * Includes an aliasing barrier if available. * @param p pointer * @return p as OldUChar * - * @draft ICU 59 + * @stable ICU 59 */ inline OldUChar *toOldUCharPtr(char16_t *p) { #ifdef U_ALIASING_BARRIER diff --git a/icu4c/source/common/unicode/edits.h b/icu4c/source/common/unicode/edits.h index 082c3733a88..5a72574c140 100644 --- a/icu4c/source/common/unicode/edits.h +++ b/icu4c/source/common/unicode/edits.h @@ -17,8 +17,6 @@ U_NAMESPACE_BEGIN -#ifndef U_HIDE_DRAFT_API - /** * Records lengths of string edits but not replacement text. * Supports replacements, insertions, deletions in linear progression. @@ -27,13 +25,13 @@ U_NAMESPACE_BEGIN * An Edits object tracks a separate UErrorCode, but ICU string transformation functions * (e.g., case mapping functions) merge any such errors into their API's UErrorCode. * - * @draft ICU 59 + * @stable ICU 59 */ class U_COMMON_API Edits U_FINAL : public UMemory { public: /** * Constructs an empty object. - * @draft ICU 59 + * @stable ICU 59 */ Edits() : array(stackArray), capacity(STACK_CAPACITY), length(0), delta(0), numChanges(0), @@ -64,7 +62,7 @@ public: /** * Destructor. - * @draft ICU 59 + * @stable ICU 59 */ ~Edits(); @@ -88,20 +86,20 @@ public: /** * Resets the data but may not release memory. - * @draft ICU 59 + * @stable ICU 59 */ void reset() U_NOEXCEPT; /** * Adds a record for an unchanged segment of text. * Normally called from inside ICU string transformation functions, not user code. - * @draft ICU 59 + * @stable ICU 59 */ void addUnchanged(int32_t unchangedLength); /** * Adds a record for a text replacement/insertion/deletion. * Normally called from inside ICU string transformation functions, not user code. - * @draft ICU 59 + * @stable ICU 59 */ void addReplace(int32_t oldLength, int32_t newLength); /** @@ -112,33 +110,35 @@ public: * and an error occurred while recording edits. * Otherwise unchanged. * @return TRUE if U_FAILURE(outErrorCode) - * @draft ICU 59 + * @stable ICU 59 */ UBool copyErrorTo(UErrorCode &outErrorCode); /** * How much longer is the new text compared with the old text? * @return new length minus old length - * @draft ICU 59 + * @stable ICU 59 */ int32_t lengthDelta() const { return delta; } /** * @return TRUE if there are any change edits - * @draft ICU 59 + * @stable ICU 59 */ UBool hasChanges() const { return numChanges != 0; } +#ifndef U_HIDE_DRAFT_API /** * @return the number of change edits * @draft ICU 60 */ int32_t numberOfChanges() const { return numChanges; } +#endif // U_HIDE_DRAFT_API /** * Access to the list of edits. * @see getCoarseIterator * @see getFineIterator - * @draft ICU 59 + * @stable ICU 59 */ struct U_COMMON_API Iterator U_FINAL : public UMemory { /** @@ -152,12 +152,12 @@ public: srcIndex(0), replIndex(0), destIndex(0) {} /** * Copy constructor. - * @draft ICU 59 + * @stable ICU 59 */ Iterator(const Iterator &other) = default; /** * Assignment operator. - * @draft ICU 59 + * @stable ICU 59 */ Iterator &operator=(const Iterator &other) = default; @@ -167,7 +167,7 @@ public: * or else the function returns immediately. Check for U_FAILURE() * on output or use with function chaining. (See User Guide for details.) * @return TRUE if there is another edit - * @draft ICU 59 + * @stable ICU 59 */ UBool next(UErrorCode &errorCode) { return next(onlyChanges_, errorCode); } @@ -188,12 +188,13 @@ public: * or else the function returns immediately. Check for U_FAILURE() * on output or use with function chaining. (See User Guide for details.) * @return TRUE if the edit for the source index was found - * @draft ICU 59 + * @stable ICU 59 */ UBool findSourceIndex(int32_t i, UErrorCode &errorCode) { return findIndex(i, TRUE, errorCode) == 0; } +#ifndef U_HIDE_DRAFT_API /** * Finds the edit that contains the destination index. * The destination index may be found in a non-change @@ -264,39 +265,40 @@ public: * @draft ICU 60 */ int32_t sourceIndexFromDestinationIndex(int32_t i, UErrorCode &errorCode); +#endif // U_HIDE_DRAFT_API /** * @return TRUE if this edit replaces oldLength() units with newLength() different ones. * FALSE if oldLength units remain unchanged. - * @draft ICU 59 + * @stable ICU 59 */ UBool hasChange() const { return changed; } /** * @return the number of units in the original string which are replaced or remain unchanged. - * @draft ICU 59 + * @stable ICU 59 */ int32_t oldLength() const { return oldLength_; } /** * @return the number of units in the modified string, if hasChange() is TRUE. * Same as oldLength if hasChange() is FALSE. - * @draft ICU 59 + * @stable ICU 59 */ int32_t newLength() const { return newLength_; } /** * @return the current index into the source string - * @draft ICU 59 + * @stable ICU 59 */ int32_t sourceIndex() const { return srcIndex; } /** * @return the current index into the replacement-characters-only string, * not counting unchanged spans - * @draft ICU 59 + * @stable ICU 59 */ int32_t replacementIndex() const { return replIndex; } /** * @return the current index into the full destination string - * @draft ICU 59 + * @stable ICU 59 */ int32_t destinationIndex() const { return destIndex; } @@ -331,7 +333,7 @@ public: * Returns an Iterator for coarse-grained changes for simple string updates. * Skips non-changes. * @return an Iterator that merges adjacent changes. - * @draft ICU 59 + * @stable ICU 59 */ Iterator getCoarseChangesIterator() const { return Iterator(array, length, TRUE, TRUE); @@ -340,7 +342,7 @@ public: /** * Returns an Iterator for coarse-grained changes and non-changes for simple string updates. * @return an Iterator that merges adjacent changes. - * @draft ICU 59 + * @stable ICU 59 */ Iterator getCoarseIterator() const { return Iterator(array, length, FALSE, TRUE); @@ -350,7 +352,7 @@ public: * Returns an Iterator for fine-grained changes for modifying styled text. * Skips non-changes. * @return an Iterator that separates adjacent changes. - * @draft ICU 59 + * @stable ICU 59 */ Iterator getFineChangesIterator() const { return Iterator(array, length, TRUE, FALSE); @@ -359,12 +361,13 @@ public: /** * Returns an Iterator for fine-grained changes and non-changes for modifying styled text. * @return an Iterator that separates adjacent changes. - * @draft ICU 59 + * @stable ICU 59 */ Iterator getFineIterator() const { return Iterator(array, length, FALSE, FALSE); } +#ifndef U_HIDE_DRAFT_API /** * Merges the two input Edits and appends the result to this object. * @@ -393,6 +396,7 @@ public: * @draft ICU 60 */ Edits &mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &errorCode); +#endif // U_HIDE_DRAFT_API private: void releaseArray() U_NOEXCEPT; @@ -415,8 +419,6 @@ private: uint16_t stackArray[STACK_CAPACITY]; }; -#endif // U_HIDE_DRAFT_API - U_NAMESPACE_END #endif // __EDITS_H__ diff --git a/icu4c/source/common/unicode/ubrk.h b/icu4c/source/common/unicode/ubrk.h index 829ba63ae0b..73c1553b243 100644 --- a/icu4c/source/common/unicode/ubrk.h +++ b/icu4c/source/common/unicode/ubrk.h @@ -268,7 +268,6 @@ ubrk_openRules(const UChar *rules, UParseError *parseErr, UErrorCode *status); -#ifndef U_HIDE_DRAFT_API /** * Open a new UBreakIterator for locating text boundaries using precompiled binary rules. * Opening a UBreakIterator this way is substantially faster than using ubrk_openRules. @@ -287,15 +286,13 @@ ubrk_openRules(const UChar *rules, * @param status Pointer to UErrorCode to receive any errors. * @return UBreakIterator for the specified rules. * @see ubrk_getBinaryRules - * @draft ICU 59 + * @stable ICU 59 */ -U_DRAFT UBreakIterator* U_EXPORT2 +U_STABLE UBreakIterator* U_EXPORT2 ubrk_openBinaryRules(const uint8_t *binaryRules, int32_t rulesLength, const UChar * text, int32_t textLength, UErrorCode * status); -#endif /* U_HIDE_DRAFT_API */ - /** * Thread safe cloning operation * @param bi iterator to be cloned @@ -596,7 +593,6 @@ ubrk_refreshUText(UBreakIterator *bi, UErrorCode *status); -#ifndef U_HIDE_DRAFT_API /** * Get a compiled binary version of the rules specifying the behavior of a UBreakIterator. * The binary rules may be used with ubrk_openBinaryRules to open a new UBreakIterator @@ -620,15 +616,13 @@ ubrk_refreshUText(UBreakIterator *bi, * otherwise 0. If not preflighting and this is larger than * rulesCapacity, *status will be set to an error. * @see ubrk_openBinaryRules - * @draft ICU 59 + * @stable ICU 59 */ -U_DRAFT int32_t U_EXPORT2 +U_STABLE int32_t U_EXPORT2 ubrk_getBinaryRules(UBreakIterator *bi, uint8_t * binaryRules, int32_t rulesCapacity, UErrorCode * status); -#endif /* U_HIDE_DRAFT_API */ - #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ #endif diff --git a/icu4c/source/common/unicode/umachine.h b/icu4c/source/common/unicode/umachine.h index 98bbd02160f..2bcaaf4050a 100644 --- a/icu4c/source/common/unicode/umachine.h +++ b/icu4c/source/common/unicode/umachine.h @@ -370,7 +370,7 @@ typedef int8_t UBool; * Exception: ICU 58 UChar was defined to UCHAR_TYPE if that macro was defined. * The current UChar responds to UCHAR_TYPE but OldUChar does not. * - * @draft ICU 59 + * @stable ICU 59 */ #if U_SIZEOF_WCHAR_T==2 typedef wchar_t OldUChar; diff --git a/icu4c/source/common/unicode/unistr.h b/icu4c/source/common/unicode/unistr.h index b99a686126c..d0b271754b6 100644 --- a/icu4c/source/common/unicode/unistr.h +++ b/icu4c/source/common/unicode/unistr.h @@ -2995,10 +2995,6 @@ 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. @@ -3008,16 +3004,12 @@ public: * -DUNISTR_FROM_STRING_EXPLICIT=explicit * on the compiler command line or similar. * @param text NUL-terminated UTF-16 string - * @draft ICU 59 + * @stable ICU 59 */ UNISTR_FROM_STRING_EXPLICIT UnicodeString(const uint16_t *text) : 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. @@ -3028,16 +3020,12 @@ public: * -DUNISTR_FROM_STRING_EXPLICIT=explicit * on the compiler command line or similar. * @param text NUL-terminated UTF-16 string - * @draft ICU 59 + * @stable ICU 59 */ UNISTR_FROM_STRING_EXPLICIT UnicodeString(const wchar_t *text) : 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. @@ -3046,7 +3034,7 @@ public: * -DUNISTR_FROM_STRING_EXPLICIT=explicit * on the compiler command line or similar. * @param text nullptr - * @draft ICU 59 + * @stable ICU 59 */ UNISTR_FROM_STRING_EXPLICIT inline UnicodeString(const std::nullptr_t text); @@ -3060,26 +3048,18 @@ 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. * Delegates to UnicodeString(const char16_t *, int32_t). * @param text UTF-16 string * @param length string length - * @draft ICU 59 + * @stable ICU 59 */ UnicodeString(const uint16_t *text, int32_t length) : 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. @@ -3087,22 +3067,18 @@ public: * Delegates to UnicodeString(const char16_t *, int32_t). * @param text NUL-terminated UTF-16 string * @param length string length - * @draft ICU 59 + * @stable ICU 59 */ UnicodeString(const wchar_t *text, int32_t length) : 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. * @param text nullptr * @param length ignored - * @draft ICU 59 + * @stable ICU 59 */ inline UnicodeString(const std::nullptr_t text, int32_t length); @@ -3152,10 +3128,6 @@ 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. @@ -3163,16 +3135,12 @@ public: * @param buffer writable buffer of/for UTF-16 text * @param buffLength length of the current buffer contents * @param buffCapacity buffer capacity - * @draft ICU 59 + * @stable ICU 59 */ UnicodeString(uint16_t *buffer, int32_t buffLength, int32_t buffCapacity) : 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. @@ -3181,23 +3149,19 @@ public: * @param buffer writable buffer of/for UTF-16 text * @param buffLength length of the current buffer contents * @param buffCapacity buffer capacity - * @draft ICU 59 + * @stable ICU 59 */ UnicodeString(wchar_t *buffer, int32_t buffLength, int32_t buffCapacity) : 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. * @param buffer nullptr * @param buffLength ignored * @param buffCapacity ignored - * @draft ICU 59 + * @stable ICU 59 */ inline UnicodeString(std::nullptr_t buffer, int32_t buffLength, int32_t buffCapacity); diff --git a/icu4c/source/i18n/unicode/measunit.h b/icu4c/source/i18n/unicode/measunit.h index 5e8b65310c7..955972440f9 100644 --- a/icu4c/source/i18n/unicode/measunit.h +++ b/icu4c/source/i18n/unicode/measunit.h @@ -832,15 +832,13 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit *createPicometer(UErrorCode &status); -#ifndef U_HIDE_DRAFT_API /** * Returns unit of length: point. * Caller owns returned value and must free it. * @param status ICU error code. - * @draft ICU 59 + * @stable ICU 59 */ static MeasureUnit *createPoint(UErrorCode &status); -#endif /* U_HIDE_DRAFT_API */ /** * Returns unit of length: yard. diff --git a/icu4c/source/i18n/unicode/unum.h b/icu4c/source/i18n/unicode/unum.h index ce38a4e2275..ff251ff2699 100644 --- a/icu4c/source/i18n/unicode/unum.h +++ b/icu4c/source/i18n/unicode/unum.h @@ -562,7 +562,6 @@ unum_formatDouble( const UNumberFormat* fmt, UFieldPosition *pos, /* 0 if ignore */ UErrorCode* status); -#ifndef U_HIDE_DRAFT_API /** * Format a double using a UNumberFormat according to the UNumberFormat's locale, * and initialize a UFieldPositionIterator that enumerates the subcomponents of @@ -603,9 +602,9 @@ unum_formatDouble( const UNumberFormat* fmt, * @see unum_parseDouble * @see UFieldPositionIterator * @see UNumberFormatFields -* @draft ICU 59 +* @stable ICU 59 */ -U_DRAFT int32_t U_EXPORT2 +U_STABLE int32_t U_EXPORT2 unum_formatDoubleForFields(const UNumberFormat* format, double number, UChar* result, @@ -613,7 +612,6 @@ unum_formatDoubleForFields(const UNumberFormat* format, UFieldPositionIterator* fpositer, UErrorCode* status); -#endif /* U_HIDE_DRAFT_API */ /** * Format a decimal number using a UNumberFormat. diff --git a/icu4c/source/i18n/unicode/upluralrules.h b/icu4c/source/i18n/unicode/upluralrules.h index 99d93a4e051..690846bc89c 100644 --- a/icu4c/source/i18n/unicode/upluralrules.h +++ b/icu4c/source/i18n/unicode/upluralrules.h @@ -175,7 +175,6 @@ uplrules_selectWithFormat(const UPluralRules *uplrules, #endif /* U_HIDE_INTERNAL_API */ -#ifndef U_HIDE_DRAFT_API /** * Creates a string enumeration of all plural rule keywords used in this * UPluralRules object. The rule "other" is always present by default. @@ -184,12 +183,11 @@ uplrules_selectWithFormat(const UPluralRules *uplrules, * @param status A pointer to a UErrorCode to receive any errors. * @return a string enumeration over plural rule keywords, or NULL * upon error. The caller is responsible for closing the result. - * @draft ICU 59 + * @stable ICU 59 */ -U_DRAFT UEnumeration* U_EXPORT2 +U_STABLE UEnumeration* U_EXPORT2 uplrules_getKeywords(const UPluralRules *uplrules, UErrorCode *status); -#endif /* U_HIDE_DRAFT_API */ #endif /* #if !UCONFIG_NO_FORMATTING */ -- 2.40.0