You've already forked linux-packaging-mono
Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
parent
8016999e4d
commit
64ac736ec5
@ -242,25 +242,6 @@ namespace System
|
||||
return countA - countB;
|
||||
}
|
||||
|
||||
internal static unsafe void CharCopy (char *dest, char *src, int count) {
|
||||
// Same rules as for memcpy, but with the premise that
|
||||
// chars can only be aligned to even addresses if their
|
||||
// enclosing types are correctly aligned
|
||||
if ((((int)(byte*)dest | (int)(byte*)src) & 3) != 0) {
|
||||
if (((int)(byte*)dest & 2) != 0 && ((int)(byte*)src & 2) != 0 && count > 0) {
|
||||
((short*)dest) [0] = ((short*)src) [0];
|
||||
dest++;
|
||||
src++;
|
||||
count--;
|
||||
}
|
||||
if ((((int)(byte*)dest | (int)(byte*)src) & 2) != 0) {
|
||||
Buffer.memcpy2 ((byte*)dest, (byte*)src, count * 2);
|
||||
return;
|
||||
}
|
||||
}
|
||||
Buffer.memcpy4 ((byte*)dest, (byte*)src, count * 2);
|
||||
}
|
||||
|
||||
#region Runtime method-to-ir dependencies
|
||||
|
||||
/* helpers used by the runtime as well as above or eslewhere in corlib */
|
||||
@ -453,4 +434,4 @@ namespace System
|
||||
return hash1 + (hash2 * 1566083941);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user