Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
BCSharp committed Dec 14, 2024
1 parent d0fb8e1 commit 80bd0be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Src/IronPython/Runtime/PythonFileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public void CloseStreams(PythonFileManager? manager) {
/// </summary>
/// <remarks>
/// PythonFileManager emulates a file descriptor table. On Windows, .NET uses Win32 API which uses file handles
/// rather than file descriptors. The emulation is necesary to support Python API, which in some places uses file descriptors.
/// rather than file descriptors. The emulation is necessary to support Python API, which in some places uses file descriptors.
///
/// The manager maintains a mapping between open files (or system file-like objects) and a "descriptor", being a small non-negative integer.
/// Unlike in CPython, the descriptors are allocated lazily, meaning they are allocated only when they become exposed (requested)
Expand All @@ -198,7 +198,7 @@ public void CloseStreams(PythonFileManager? manager) {
/// In such situations, only one of the FileIO may be opened with flag `closefd` (CPython rule).
///
/// The second lever of sharing of open files is below the file descriptor level. A file descriptor can be duplicated using dup/dup2,
/// but the duplicated descriptor is still refering to the same open file in the filesystem. In such case, the manager maintains
/// but the duplicated descriptor is still referring to the same open file in the filesystem. In such case, the manager maintains
/// a separate StreamBox for the duplicated descriptor, but the StreamBoxes for both descriptors share the underlying Streams.
/// Both such descriptors have to be closed independently by the user code (either explicitly by os.close(fd) or through close()
/// on the FileIO objects), but the underlying shared streams are closed only when all such duplicated descriptors are closed.
Expand Down Expand Up @@ -236,7 +236,7 @@ internal class PythonFileManager {
private readonly ConcurrentDictionary<Stream, int> _refs = new();

// This version of Add is used with genuine file descriptors (Unix).
// Exception: support dup2 on all frameworks/platfroms.
// Exception: support dup2 on all frameworks/platforms.
public int Add(int id, StreamBox streams) {
ContractUtils.RequiresNotNull(streams, nameof(streams));
ContractUtils.Requires(streams.Id < 0, nameof(streams));
Expand Down

0 comments on commit 80bd0be

Please sign in to comment.