You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @andrew-boyarshin ,
Recent .NET language added nint and nuint support, I would suggest to remove PointerSize and map to those directly, same applies to SharpGen.Runtime.COM.
It is supported in ClangSharp as well:
intptr_t -> nint
ptrdiff_t -> nint
size_t -> nuint
uintptr_t -> nuint
SIZE_T -> nuint
SSIZE_T -> nint
The text was updated successfully, but these errors were encountered:
Having PointerSize might theoretically enable us to provide APIs not available on pre-.NET5 runtimes (like IComparable). But yeah, using these is simpler.
If you plan to keep PointerSize then we need UPointerSize with ulong and map SIZE_T to that instance.
Otherwise we'll end in marshalling issues (amerkoleci/Vortice.Windows#185)
Yeah, I know that nint is a syntax sugar for System.IntPtr and native int. But until .NET 5 (dotnet/runtime#307) IntPtr had a much more narrow API surface, and so does the nint on these older runtimes.
Hi @andrew-boyarshin ,
Recent .NET language added nint and nuint support, I would suggest to remove PointerSize and map to those directly, same applies to SharpGen.Runtime.COM.
It is supported in ClangSharp as well:
intptr_t -> nint
ptrdiff_t -> nint
size_t -> nuint
uintptr_t -> nuint
SIZE_T -> nuint
SSIZE_T -> nint
The text was updated successfully, but these errors were encountered: