-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Rename Pin offset to byteOffset and clean up Retain test #26518
Conversation
@@ -226,7 +226,7 @@ public abstract partial class OwnedMemory<T> : System.Buffers.IRetainable, Syste | |||
public abstract System.Span<T> Span { get; } | |||
public void Dispose() { } | |||
protected abstract void Dispose(bool disposing); | |||
public abstract System.Buffers.MemoryHandle Pin(int offset=0); | |||
public abstract System.Buffers.MemoryHandle Pin(int byteOffset=0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Extra space around =
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There aren't spaces around =
in most other places within the refs:
https://github.com/dotnet/corefx/blob/master/src/System.Runtime/ref/System.Runtime.cs#L1521
https://github.com/dotnet/corefx/blob/master/src/System.Runtime/ref/System.Runtime.cs#L462
https://github.com/dotnet/corefx/blob/master/src/System.Runtime/ref/System.Runtime.cs#L1480
https://github.com/dotnet/corefx/blob/master/src/System.Memory/ref/System.Memory.cs#L206
But there is some inconsistency:
https://github.com/dotnet/corefx/blob/master/src/System.Buffers/ref/System.Buffers.cs#L16
cc @weshaggard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the tool doesn't put spaces around this. Easy to fix if someone want to change it, https://github.com/dotnet/buildtools/blob/master/src/Microsoft.Cci.Extensions/Writers/CSharp/CSDeclarationWriter.Methods.cs#L159
@@ -3728,7 +3728,7 @@ public abstract partial class OwnedMemory<T> : System.Buffers.IRetainable, Syste | |||
public abstract System.Span<T> Span { get; } | |||
public void Dispose() { } | |||
protected abstract void Dispose(bool disposing); | |||
public abstract MemoryHandle Pin(int offset=0); | |||
public abstract MemoryHandle Pin(int byteOffset=0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
cc @atsushikan, @jkotas, @KrzysztofCwalina