Skip to content

Commit f999e0a

Browse files
committed
ICU-23092 u_getIntPropertyMaxValue(UCHAR_INDIC_CONJUNCT_BREAK) returns valid max value.
1 parent ee90520 commit f999e0a

File tree

5 files changed

+14
-1
lines changed

5 files changed

+14
-1
lines changed

icu4c/source/common/uchar_props_data.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -4257,6 +4257,6 @@ static const UCPTrie block_trie={
42574257
0x0,
42584258
};
42594259

4260-
static const int32_t indexes[UPROPS_INDEX_COUNT]={0x2e8e,0x2e8e,0x2e8e,0x2e8e,0x6db4,3,0x86ce,0x87d5,0x8f67,0x8f67,0x50cf,0x2f75a31,0x152,0,0,0};
4260+
static const int32_t indexes[UPROPS_INDEX_COUNT]={0x2e8e,0x2e8e,0x2e8e,0x2e8e,0x6db4,3,0x86ce,0x87d5,0x8f67,0x8f67,0x1d0cf,0x2f75a31,0x152,0,0,0};
42614261

42624262
#endif // INCLUDED_FROM_UCHAR_C

icu4c/source/common/unicode/uchar.h

+9
Original file line numberDiff line numberDiff line change
@@ -2763,6 +2763,15 @@ typedef enum UIndicConjunctBreak {
27632763
U_INCB_EXTEND,
27642764
/** @draft ICU 76 */
27652765
U_INCB_LINKER,
2766+
#ifndef U_HIDE_DEPRECATED_API
2767+
/**
2768+
* One more than the highest normal UIndicConjunctBreak value.
2769+
* The highest value is available via u_getIntPropertyMaxValue(UCHAR_INDIC_CONJUNCT_BREAK).
2770+
*
2771+
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
2772+
*/
2773+
U_INCB_COUNT
2774+
#endif // U_HIDE_DEPRECATED_API
27662775
} UIndicConjunctBreak;
27672776
#endif // U_HIDE_DRAFT_API
27682777

icu4c/source/data/in/uprops.icu

0 Bytes
Binary file not shown.

icu4c/source/test/cintltst/cucdtst.c

+3
Original file line numberDiff line numberDiff line change
@@ -2915,6 +2915,9 @@ TestAdditionalProperties(void) {
29152915
if( u_getIntPropertyMaxValue(UCHAR_EAST_ASIAN_WIDTH) != (int32_t) (U_EA_COUNT -1)) {
29162916
log_err("error: u_getIntPropertyMaxValue(UCHAR_EAST_ASIAN_WIDTH) wrong\n");
29172917
}
2918+
if( u_getIntPropertyMaxValue(UCHAR_INDIC_CONJUNCT_BREAK) != (int32_t) (U_INCB_COUNT -1)) {
2919+
log_err("error: u_getIntPropertyMaxValue(UCHAR_INDIC_CONJUNCT_BREAK) wrong\n");
2920+
}
29182921

29192922
/* test u_hasBinaryProperty() and u_getIntPropertyValue() */
29202923
for(i=0; i<UPRV_LENGTHOF(props); ++i) {

tools/unicode/c/genprops/corepropsbuilder.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,7 @@ CorePropsBuilder::build(UErrorCode &errorCode) {
965965
totalSize=4*offset;
966966

967967
indexes[UPROPS_MAX_VALUES_INDEX]=
968+
(((int32_t)U_INCB_COUNT-1)<<UPROPS_INCB_SHIFT)|
968969
(((int32_t)U_EA_COUNT-1)<<UPROPS_EA_SHIFT)|
969970
((int32_t)USCRIPT_CODE_LIMIT-1);
970971
indexes[UPROPS_MAX_VALUES_2_INDEX]=

0 commit comments

Comments
 (0)