Skip to content

Commit eb32199

Browse files
Fix regression caused by overload resolution. (#115164)
1 parent f18be58 commit eb32199

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libraries/System.Private.CoreLib/src/System/Buffer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public static unsafe void MemoryCopy(void* source, void* destination, ulong dest
127127
// Non-inlinable wrapper around the QCall that avoids polluting the fast path
128128
// with P/Invoke prolog/epilog.
129129
[MethodImpl(MethodImplOptions.NoInlining)]
130-
internal static unsafe void Memmove(ref byte dest, ref byte src, nuint len)
130+
internal static unsafe void MemmoveInternal(ref byte dest, ref byte src, nuint len)
131131
{
132132
fixed (byte* pDest = &dest)
133133
fixed (byte* pSrc = &src)
@@ -137,7 +137,7 @@ internal static unsafe void Memmove(ref byte dest, ref byte src, nuint len)
137137
// Non-inlinable wrapper around the QCall that avoids polluting the fast path
138138
// with P/Invoke prolog/epilog.
139139
[MethodImpl(MethodImplOptions.NoInlining)]
140-
internal static unsafe void ZeroMemory(ref byte b, nuint byteLength)
140+
internal static unsafe void ZeroMemoryInternal(ref byte b, nuint byteLength)
141141
{
142142
fixed (byte* bytePointer = &b)
143143
{

src/libraries/System.Private.CoreLib/src/System/SpanHelpers.ByteMemOps.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ internal static void Memmove(ref byte dest, ref byte src, nuint len)
239239
Debug.Assert(len > 0);
240240
_ = Unsafe.ReadUnaligned<byte>(ref dest);
241241
_ = Unsafe.ReadUnaligned<byte>(ref src);
242-
Buffer.Memmove(ref dest, ref src, len);
242+
Buffer.MemmoveInternal(ref dest, ref src, len);
243243
}
244244

245245
[Intrinsic] // Unrolled for small sizes
@@ -425,7 +425,7 @@ public static void ClearWithoutReferences(ref byte dest, nuint len)
425425
PInvoke:
426426
// Implicit nullchecks
427427
_ = Unsafe.ReadUnaligned<byte>(ref dest);
428-
Buffer.ZeroMemory(ref dest, len);
428+
Buffer.ZeroMemoryInternal(ref dest, len);
429429
}
430430

431431
internal static void Fill(ref byte dest, byte value, nuint len)

0 commit comments

Comments
 (0)