Skip to content

Commit

Permalink
Remove some unsafe annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp committed Oct 29, 2022
1 parent bd78caf commit b08a95f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/Terminals/Unix/Linux/LinuxVirtualTerminal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public override int OpenTerminalHandle(string name)
return open(name, O_RDWR | O_NOCTTY | O_CLOEXEC);
}

public override unsafe bool PollHandles(int? error, short events, scoped Span<int> handles)
public override bool PollHandles(int? error, short events, scoped Span<int> handles)
{
if (error is int err && err != EAGAIN)
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/core/Terminals/Unix/MacOS/MacOSVirtualTerminal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public override int OpenTerminalHandle(string name)
return open(name, O_RDWR | O_NOCTTY | O_CLOEXEC);
}

public override unsafe bool PollHandles(int? error, short events, scoped Span<int> handles)
public override bool PollHandles(int? error, short events, scoped Span<int> handles)
{
if (error is int err && err != EAGAIN)
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/core/Terminals/Unix/UnixTerminalReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public UnixTerminalReader(
_cancellationPipe = cancellationPipe;
}

protected override unsafe int ReadPartialCore(scoped Span<byte> buffer, CancellationToken cancellationToken)
protected override int ReadPartialCore(scoped Span<byte> buffer, CancellationToken cancellationToken)
{
using var guard = Terminal.Control.Guard();

Expand Down
2 changes: 1 addition & 1 deletion src/core/Terminals/Unix/UnixTerminalWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public UnixTerminalWriter(UnixVirtualTerminal terminal, string name, int handle,
_semaphore = semaphore;
}

protected override unsafe int WritePartialCore(
protected override int WritePartialCore(
scoped ReadOnlySpan<byte> buffer, CancellationToken cancellationToken)
{
using var guard = Terminal.Control.Guard();
Expand Down

0 comments on commit b08a95f

Please sign in to comment.