From 64211405dab824a570e52d000891c49415cc42b8 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Mon, 26 Mar 2018 15:29:02 -0700 Subject: deps: ICU 61.1 bump - Update to released ICU 61.1, including: - CLDR 33 (many new languages and data improvements) - Many small API additions, improvements, and bug fixes - note: 'icu::' namespace is no longer used by default (Necessated https://github.com/nodejs/node/pull/18667 ) PR-URL: https://github.com/nodejs/node/pull/19621 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- deps/icu-small/source/common/unicode/edits.h | 58 ++++++++++++++-------------- 1 file changed, 30 insertions(+), 28 deletions(-) (limited to 'deps/icu-small/source/common/unicode/edits.h') diff --git a/deps/icu-small/source/common/unicode/edits.h b/deps/icu-small/source/common/unicode/edits.h index 082c3733a8..5a72574c14 100644 --- a/deps/icu-small/source/common/unicode/edits.h +++ b/deps/icu-small/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__ -- cgit v1.2.3