-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Use ReadOnlySpan for DefaultExponent #33820
Conversation
src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Bignum.cs
Outdated
Show resolved
Hide resolved
OpenSSL handles this condition itself.
Hello @bartonjs! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Something strikes me as weird about using |
@GrabYourPitchforks hm, yeah I suppose I could see that. There is prior art for both cases. Since "System.Net.Http.Functional.Tests" saved this from getting merged, is the preference that I change it? |
If auto-merge failed, may as well improve it. Didn't want to hold up an already approved PR just for this though. :) |
All of the @stephentoub Do you have thoughts or feelings for |
byte* is likely tad cheaper / less magic, assuming it's the only thing that would cause a stub to need to be created. But no strong preference. |
@bartonjs @GrabYourPitchforks So, uh change it? While I have y'all here, is there a meaningful difference between: fixed (byte* x = &MemoryMarshal.GetReference(foo)) {
} and fixed (byte* x = foo) {
} Is the former just from the times before |
Yes. The latter includes length check that returns null if the length is 0: runtime/src/libraries/System.Private.CoreLib/src/System/Span.cs Lines 267 to 269 in 4bdf468
The former does not: runtime/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MemoryMarshal.cs Line 88 in 4bdf468
|
Just something I noticed while perusing code.
/cc @bartonjs