mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-25 06:17:10 +02:00
misc: Replace references to IntPtr/UIntPtr with nint/nuint + code cleanups.
This commit is contained in:
parent
a09d314817
commit
dfb4854d19
172 changed files with 902 additions and 914 deletions
|
@ -127,13 +127,13 @@ namespace ARMeilleure.CodeGen.Arm64
|
|||
#region macOS
|
||||
|
||||
[LibraryImport("libSystem.dylib", SetLastError = true)]
|
||||
private static unsafe partial int sysctlbyname([MarshalAs(UnmanagedType.LPStr)] string name, out int oldValue, ref ulong oldSize, IntPtr newValue, ulong newValueSize);
|
||||
private static unsafe partial int sysctlbyname([MarshalAs(UnmanagedType.LPStr)] string name, out int oldValue, ref ulong oldSize, nint newValue, ulong newValueSize);
|
||||
|
||||
[SupportedOSPlatform("macos")]
|
||||
private static bool CheckSysctlName(string name)
|
||||
{
|
||||
ulong size = sizeof(int);
|
||||
if (sysctlbyname(name, out int val, ref size, IntPtr.Zero, 0) == 0 && size == sizeof(int))
|
||||
if (sysctlbyname(name, out int val, ref size, nint.Zero, 0) == 0 && size == sizeof(int))
|
||||
{
|
||||
return val != 0;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace ARMeilleure.CodeGen
|
|||
/// <typeparam name="T">Type of delegate</typeparam>
|
||||
/// <param name="codePointer">Pointer to the function code in memory</param>
|
||||
/// <returns>A delegate of type <typeparamref name="T"/> pointing to the mapped function</returns>
|
||||
public T MapWithPointer<T>(out IntPtr codePointer)
|
||||
public T MapWithPointer<T>(out nint codePointer)
|
||||
{
|
||||
codePointer = JitCache.Map(this);
|
||||
|
||||
|
|
|
@ -387,7 +387,7 @@ namespace ARMeilleure.CodeGen.RegisterAllocators
|
|||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine((IntPtr)_data);
|
||||
return HashCode.Combine((nint)_data);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace ARMeilleure.CodeGen.RegisterAllocators
|
|||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine((IntPtr)_data);
|
||||
return HashCode.Combine((nint)_data);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue