Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix remaining using nuing = aliases #44117

Closed
stephentoub opened this issue Nov 1, 2020 · 4 comments
Closed

Fix remaining using nuing = aliases #44117

stephentoub opened this issue Nov 1, 2020 · 4 comments
Labels
area-System.Runtime enhancement Product code improvement that does NOT require public API changes/additions

Comments

@stephentoub
Copy link
Member

stephentoub commented Nov 1, 2020

There are still a few places where we're explicitly defining nint/nuint as aliases for int/long/uint/ulong rather than using the new C# 9 types:

d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs(13):using nint = System.Int64;
d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs(14):using nuint = System.UInt64;
d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs(16):using nint = System.Int32;
d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs(17):using nuint = System.UInt32;
d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs(18):using nuint_t = System.UInt64;
d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs(20):using nuint_t = System.UInt32;
d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs(23):using nuint_t = System.UInt64;

cc: @GrabYourPitchforks

@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Nov 1, 2020
@stephentoub stephentoub added area-System.Runtime enhancement Product code improvement that does NOT require public API changes/additions labels Nov 1, 2020
@jkotas
Copy link
Member

jkotas commented Nov 1, 2020

Fixing Utf16Utility.Validation.cs needs #36160.

@GrabYourPitchforks
Copy link
Member

Vector<nuint_t> is only used in one place in that file. We could use if (IntPtr.Size == 8) { /* ... */ } else { /* ... */ } if we really needed to. It's not that much code duplication.

@tannergooding
Copy link
Member

This was resolved a bit back (same time as #36160 was resolved)

@tannergooding tannergooding removed the untriaged New issue has not been triaged by the area owner label Jul 12, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime enhancement Product code improvement that does NOT require public API changes/additions
Projects
None yet
Development

No branches or pull requests

5 participants