diff --git a/icu4c/source/common/propname.h b/icu4c/source/common/propname.h index 400838f0ce..d762af52e5 100644 --- a/icu4c/source/common/propname.h +++ b/icu4c/source/common/propname.h @@ -89,6 +89,7 @@ class PropertyAliases { // The following are needed by external readers of this data. // We don't use them ourselves. + int16_t total_size; // size in bytes excluding the udata header Offset valueMap_offset; // offset to start of array int16_t valueMap_count; // number of entries Offset nameGroupPool_offset; // offset to start of array @@ -96,8 +97,6 @@ class PropertyAliases { Offset stringPool_offset; // offset to start of pool int16_t stringPool_count; // number of strings - int16_t reserved; - // -- end pnames data -- friend class Builder; diff --git a/icu4c/source/tools/genpname/genpname.cpp b/icu4c/source/tools/genpname/genpname.cpp index 8d908a0c0a..2284c480b4 100644 --- a/icu4c/source/tools/genpname/genpname.cpp +++ b/icu4c/source/tools/genpname/genpname.cpp @@ -784,6 +784,9 @@ void Builder::fixupMiscellaneousOffsets() { header.enumToName_offset = enumToName_offset; header.nameToEnum_offset = nameToEnum_offset; header.enumToValue_offset = enumToValue_offset; + // header meta-info used by Java: + U_ASSERT(total_size > 0 && total_size < 0x7FFF); + header.total_size = (int16_t) total_size; header.valueMap_offset = valueMap_offset; header.valueMap_count = (int16_t) valueMap_count; header.nameGroupPool_offset = nameGroupPool_offset;