From 5148a38143d912d4e74a118f0b7131c178962bf3 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Fri, 21 Sep 2018 16:53:20 -0700 Subject: [PATCH] ICU-20125 numeric values of level constants will not change; fix/update some docs (#159) --- icu4c/source/common/unicode/ubidi.h | 10 +++++-- .../core/src/com/ibm/icu/text/Bidi.java | 29 ++++++++++++------- .../src/com/ibm/icu/text/BidiClassifier.java | 3 +- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/icu4c/source/common/unicode/ubidi.h b/icu4c/source/common/unicode/ubidi.h index 254a5bf9ef..f4875c8801 100644 --- a/icu4c/source/common/unicode/ubidi.h +++ b/icu4c/source/common/unicode/ubidi.h @@ -323,6 +323,10 @@ * these special values are designed that way. Also, the implementation * assumes that UBIDI_MAX_EXPLICIT_LEVEL is odd. * + * Note: The numeric values of the related constants will not change: + * They are tied to the use of 7-bit byte values (plus the override bit) + * and of the UBiDiLevel=uint8_t data type in this API. + * * @see UBIDI_DEFAULT_LTR * @see UBIDI_DEFAULT_RTL * @see UBIDI_LEVEL_OVERRIDE @@ -386,6 +390,8 @@ typedef uint8_t UBiDiLevel; /** * Maximum explicit embedding level. + * Same as the max_depth value in the + * Unicode Bidirectional Algorithm. * (The maximum resolved level can be up to UBIDI_MAX_EXPLICIT_LEVEL+1). * @stable ICU 2.0 */ @@ -1996,7 +2002,7 @@ U_CDECL_BEGIN * * @return The directional property / Bidi class for the given code point * c if the default class has been overridden, or - * #U_BIDI_CLASS_DEFAULT=u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1 + * u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1 * if the standard Bidi class value for c is to be used. * @see ubidi_setClassCallback * @see ubidi_getClassCallback @@ -2010,7 +2016,7 @@ U_CDECL_END /** * Retrieve the Bidi class for a given code point. *

If a #UBiDiClassCallback callback is defined and returns a - * value other than #U_BIDI_CLASS_DEFAULT=u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1, + * value other than u_getIntPropertyMaxValue(UCHAR_BIDI_CLASS)+1, * that value is used; otherwise the default class determination mechanism is invoked.

* * @param pBiDi is the paragraph UBiDi object. diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/Bidi.java b/icu4j/main/classes/core/src/com/ibm/icu/text/Bidi.java index 2fb22188a9..6da0d64de9 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/Bidi.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/Bidi.java @@ -114,7 +114,11 @@ import com.ibm.icu.lang.UProperty; * these special values are designed that way. Also, the implementation * assumes that MAX_EXPLICIT_LEVEL is odd. * - * See Also: + *

Note: The numeric values of the related constants will not change: + * They are tied to the use of 7-bit byte values (plus the override bit) + * and of the byte data type in this API. + * + *

See Also: *