mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-2974 use uprv_memcpy instead of memcpy
X-SVN-Rev: 12432
This commit is contained in:
parent
623319609f
commit
bd90032804
4 changed files with 8 additions and 8 deletions
|
@ -624,7 +624,7 @@ Hashtable *CanonicalIterator::extract(UChar32 comp, const UChar *segment, int32_
|
|||
|
||||
if (decompPos == decompLen) { // done, have all decomp characters!
|
||||
//u_strcat(buff+bufLen, segment+i);
|
||||
memcpy(buff+bufLen, segment+i, (segLen-i)*sizeof(UChar));
|
||||
uprv_memcpy(buff+bufLen, segment+i, (segLen-i)*sizeof(UChar));
|
||||
bufLen+=segLen-i;
|
||||
|
||||
ok = TRUE;
|
||||
|
|
|
@ -6552,7 +6552,7 @@ ucol_safeClone(const UCollator *coll, void *stackBuffer, int32_t * pBufferSize,
|
|||
}
|
||||
} else {
|
||||
localCollator = (UCollator *)stackBuffer;
|
||||
memcpy(localCollator, coll, sizeof(UCollator));
|
||||
uprv_memcpy(localCollator, coll, sizeof(UCollator));
|
||||
localCollator->freeOnClose = FALSE;
|
||||
localCollator->requestedLocale = NULL; // zero copies of pointers
|
||||
localCollator->validLocale = NULL;
|
||||
|
|
|
@ -1325,7 +1325,7 @@ uprv_uca_assembleTable(tempUCATable *t, UErrorCode *status) {
|
|||
/* copy expansions */
|
||||
/*myData->expansion = (uint32_t *)dataStart+tableOffset;*/
|
||||
myData->expansion = tableOffset;
|
||||
memcpy(dataStart+tableOffset, expansions->CEs, expansions->position*sizeof(uint32_t));
|
||||
uprv_memcpy(dataStart+tableOffset, expansions->CEs, expansions->position*sizeof(uint32_t));
|
||||
tableOffset += (uint32_t)(paddedsize(expansions->position*sizeof(uint32_t)));
|
||||
|
||||
/* contractions block */
|
||||
|
@ -1333,13 +1333,13 @@ uprv_uca_assembleTable(tempUCATable *t, UErrorCode *status) {
|
|||
/* copy contraction index */
|
||||
/*myData->contractionIndex = (UChar *)(dataStart+tableOffset);*/
|
||||
myData->contractionIndex = tableOffset;
|
||||
memcpy(dataStart+tableOffset, contractions->codePoints, contractionsSize*sizeof(UChar));
|
||||
uprv_memcpy(dataStart+tableOffset, contractions->codePoints, contractionsSize*sizeof(UChar));
|
||||
tableOffset += (uint32_t)(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));
|
||||
uprv_memcpy(dataStart+tableOffset, contractions->CEs, contractionsSize*sizeof(uint32_t));
|
||||
tableOffset += (uint32_t)(paddedsize(contractionsSize*sizeof(uint32_t)));
|
||||
} else {
|
||||
myData->contractionIndex = 0;
|
||||
|
@ -1349,7 +1349,7 @@ uprv_uca_assembleTable(tempUCATable *t, UErrorCode *status) {
|
|||
/* copy mapping table */
|
||||
/*myData->mappingPosition = dataStart+tableOffset;*/
|
||||
/*myData->mappingPosition = tableOffset;*/
|
||||
/*memcpy(dataStart+tableOffset, flattened, mappingSize);*/
|
||||
/*uprv_memcpy(dataStart+tableOffset, flattened, mappingSize);*/
|
||||
|
||||
myData->mappingPosition = tableOffset;
|
||||
utrie_serialize(mapping, dataStart+tableOffset, toAllocate-tableOffset, getFoldedValue, FALSE, status);
|
||||
|
|
|
@ -1369,8 +1369,8 @@ uint32_t ucol_tok_assembleTokenList(UColTokenParser *src, UParseError *parseErro
|
|||
} else if(sourceToken->expansion == 0) { /* if there is no expansion, implicit is just added to the token */
|
||||
sourceToken->expansion = expandNext;
|
||||
} else { /* there is both explicit and implicit expansion. We need to make a combination */
|
||||
memcpy(src->extraCurrent, src->source + (expandNext & 0xFFFFFF), (expandNext >> 24)*sizeof(UChar));
|
||||
memcpy(src->extraCurrent+(expandNext >> 24), src->source + src->parsedToken.extensionOffset, src->parsedToken.extensionLen*sizeof(UChar));
|
||||
uprv_memcpy(src->extraCurrent, src->source + (expandNext & 0xFFFFFF), (expandNext >> 24)*sizeof(UChar));
|
||||
uprv_memcpy(src->extraCurrent+(expandNext >> 24), src->source + src->parsedToken.extensionOffset, src->parsedToken.extensionLen*sizeof(UChar));
|
||||
sourceToken->expansion = (uint32_t)(((expandNext >> 24) + src->parsedToken.extensionLen)<<24 | (src->extraCurrent - src->source));
|
||||
src->extraCurrent += (expandNext >> 24) + src->parsedToken.extensionLen;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue