ICU-96 if the tailoring has no contractions, don't write them out (and don't malloc(0))
X-SVN-Rev: 4116
This commit is contained in:
parent
8939476885
commit
990542a318
@ -87,7 +87,7 @@ int32_t uprv_cnttab_moveTable(CntTable *table, uint32_t oldOffset, uint32_t newO
|
||||
|
||||
int32_t uprv_cnttab_constructTable(CntTable *table, uint32_t mainOffset, UErrorCode *status) {
|
||||
int32_t i = 0, j = 0;
|
||||
if(U_FAILURE(*status)) {
|
||||
if(U_FAILURE(*status) || table->size == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -552,17 +552,22 @@ UCATableHeader *uprv_uca_assembleTable(tempUCATable *t, UErrorCode *status) {
|
||||
tableOffset += paddedsize(expansions->position*sizeof(uint32_t));
|
||||
|
||||
/* contractions block */
|
||||
/* copy contraction index */
|
||||
/*myData->contractionIndex = (UChar *)(dataStart+tableOffset);*/
|
||||
myData->contractionIndex = tableOffset;
|
||||
memcpy(dataStart+tableOffset, contractions->codePoints, contractionsSize*sizeof(UChar));
|
||||
tableOffset += paddedsize(contractionsSize*sizeof(UChar));
|
||||
if(contractionsSize != 0) {
|
||||
/* copy contraction index */
|
||||
/*myData->contractionIndex = (UChar *)(dataStart+tableOffset);*/
|
||||
myData->contractionIndex = tableOffset;
|
||||
memcpy(dataStart+tableOffset, contractions->codePoints, contractionsSize*sizeof(UChar));
|
||||
tableOffset += paddedsize(contractionsSize*sizeof(UChar));
|
||||
|
||||
/* copy contraction collation elements */
|
||||
/*myData->contractionCEs = (uint32_t *)(dataStart+tableOffset);*/
|
||||
myData->contractionCEs = tableOffset;
|
||||
memcpy(dataStart+tableOffset, contractions->CEs, contractionsSize*sizeof(uint32_t));
|
||||
tableOffset += paddedsize(contractionsSize*sizeof(uint32_t));
|
||||
/* copy contraction collation elements */
|
||||
/*myData->contractionCEs = (uint32_t *)(dataStart+tableOffset);*/
|
||||
myData->contractionCEs = tableOffset;
|
||||
memcpy(dataStart+tableOffset, contractions->CEs, contractionsSize*sizeof(uint32_t));
|
||||
tableOffset += paddedsize(contractionsSize*sizeof(uint32_t));
|
||||
} else {
|
||||
myData->contractionIndex = 0;
|
||||
myData->contractionIndex = 0;
|
||||
}
|
||||
|
||||
/* copy mapping table */
|
||||
/*myData->mappingPosition = dataStart+tableOffset;*/
|
||||
|
Loading…
Reference in New Issue
Block a user