diff --git a/icu4c/source/common/propname_data.h b/icu4c/source/common/propname_data.h index ffa3eebe62..f7d01064da 100644 --- a/icu4c/source/common/propname_data.h +++ b/icu4c/source/common/propname_data.h @@ -4,13 +4,15 @@ * * file name: propname_data.h * - * machine-generated on: 2010-12-30 + * machine-generated on: 2010-12-31 */ #ifndef INCLUDED_FROM_PROPNAME_CPP # error This file must be #included from propname.cpp only. #endif +U_NAMESPACE_BEGIN + const int32_t PropNameData::indexes[8]={0x20,0xf94,0x3789,0x6789,0x6789,0x6789,0x2f,0}; const int32_t PropNameData::valueMaps[989]={ @@ -1238,3 +1240,5 @@ const char PropNameData::nameGroups[12288]={ 2,'Z',0,'S','e','p','a','r','a','t','o','r',0,2,'s','c','x',0,'S','c','r','i','p','t','_','E','x','t','e','n','s','i', 'o','n','s',0 }; + +U_NAMESPACE_END diff --git a/icu4c/source/tools/toolutil/bytetriebuilder.cpp b/icu4c/source/tools/toolutil/bytetriebuilder.cpp index 01814cff46..22e622b59a 100644 --- a/icu4c/source/tools/toolutil/bytetriebuilder.cpp +++ b/icu4c/source/tools/toolutil/bytetriebuilder.cpp @@ -573,7 +573,7 @@ ByteTrieBuilder::BTLinearMatchNode::write(DictTrieBuilder &builder) { ByteTrieBuilder &b=(ByteTrieBuilder &)builder; next->write(builder); b.write(s, length); - offset=b.write(ByteTrie::kMinLinearMatch+length-1); + offset=b.write(minLinearMatch()+length-1); } void @@ -638,7 +638,7 @@ ByteTrieBuilder::BTBranchHeadNode::write(DictTrieBuilder &builder) { ByteTrieBuilder &b=(ByteTrieBuilder &)builder; next->write(builder); offset=b.write((length-1)); - if(length>ByteTrie::kMinLinearMatch) { + if(length>minLinearMatch()) { offset=b.write(0); } } diff --git a/icu4c/source/tools/toolutil/bytetriebuilder.h b/icu4c/source/tools/toolutil/bytetriebuilder.h index 8fa9175b0a..ed4e0564fb 100644 --- a/icu4c/source/tools/toolutil/bytetriebuilder.h +++ b/icu4c/source/tools/toolutil/bytetriebuilder.h @@ -19,6 +19,7 @@ #include "unicode/utypes.h" #include "unicode/stringpiece.h" +#include "bytetrie.h" #include "charstr.h" #include "dicttriebuilder.h" @@ -59,6 +60,13 @@ private: int32_t writeDelta(int32_t i); // Compacting builder. + + // Indirect "friend" access. + // Nested classes cannot be friends of ByteTrie unless the whole header is included, + // at least with AIX xlC_r, + // so this Builder class, which is a friend, provides the necessary value. + static int32_t minLinearMatch() { return ByteTrie::kMinLinearMatch; } + class BTFinalValueNode : public FinalValueNode { public: BTFinalValueNode(int32_t v) : FinalValueNode(v) {} diff --git a/icu4c/source/tools/toolutil/uchartriebuilder.cpp b/icu4c/source/tools/toolutil/uchartriebuilder.cpp index c28df2a5ed..df408344c8 100644 --- a/icu4c/source/tools/toolutil/uchartriebuilder.cpp +++ b/icu4c/source/tools/toolutil/uchartriebuilder.cpp @@ -511,7 +511,7 @@ UCharTrieBuilder::UCTLinearMatchNode::write(DictTrieBuilder &builder) { UCharTrieBuilder &b=(UCharTrieBuilder &)builder; next->write(builder); b.write(s, length); - offset=b.writeValueAndType(hasValue, value, UCharTrie::kMinLinearMatch+length-1); + offset=b.writeValueAndType(hasValue, value, minLinearMatch()+length-1); } void @@ -575,7 +575,7 @@ void UCharTrieBuilder::UCTBranchHeadNode::write(DictTrieBuilder &builder) { UCharTrieBuilder &b=(UCharTrieBuilder &)builder; next->write(builder); - if(length<=UCharTrie::kMinLinearMatch) { + if(length<=minLinearMatch()) { offset=b.writeValueAndType(hasValue, value, length-1); } else { b.write(length-1); diff --git a/icu4c/source/tools/toolutil/uchartriebuilder.h b/icu4c/source/tools/toolutil/uchartriebuilder.h index 238b2f2754..3329802521 100644 --- a/icu4c/source/tools/toolutil/uchartriebuilder.h +++ b/icu4c/source/tools/toolutil/uchartriebuilder.h @@ -20,6 +20,7 @@ #include "unicode/utypes.h" #include "unicode/unistr.h" #include "dicttriebuilder.h" +#include "uchartrie.h" U_NAMESPACE_BEGIN @@ -59,6 +60,13 @@ private: int32_t writeDelta(int32_t i); // Compacting builder. + + // Indirect "friend" access. + // Nested classes cannot be friends of UCharTrie unless the whole header is included, + // at least with AIX xlC_r, + // so this Builder class, which is a friend, provides the necessary value. + static int32_t minLinearMatch() { return UCharTrie::kMinLinearMatch; } + class UCTFinalValueNode : public FinalValueNode { public: UCTFinalValueNode(int32_t v) : FinalValueNode(v) {}