Skip to content

Commit 7ca47e0

Browse files
committed
fix typos
1 parent 4d87088 commit 7ca47e0

File tree

10 files changed

+24
-24
lines changed

10 files changed

+24
-24
lines changed

Samples/SwiftKitSampleApp/src/test/java/org/swift/swiftkit/SwiftArenaTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void arena_markAsDestroyed_preventUseAfterFree_class() {
6363

6464
try {
6565
unsafelyEscapedOutsideArenaScope.echoIntMethod(1);
66-
fail("Expected exception to be thrown! Object was suposed to be dead.");
66+
fail("Expected exception to be thrown! Object was supposed to be dead.");
6767
} catch (IllegalStateException ex) {
6868
return;
6969
}
@@ -82,7 +82,7 @@ public void arena_markAsDestroyed_preventUseAfterFree_struct() {
8282

8383
try {
8484
unsafelyEscapedOutsideArenaScope.echoIntMethod(1);
85-
fail("Expected exception to be thrown! Object was suposed to be dead.");
85+
fail("Expected exception to be thrown! Object was supposed to be dead.");
8686
} catch (IllegalStateException ex) {
8787
return;
8888
}

Sources/JavaKit/JavaValue.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import JavaTypes
3434
/// The protocol provides operations to bridge values in both directions:
3535
/// - `getJNIValue(in:)`: produces the JNI value (of type `JNIType`) for the
3636
/// `self` Swift value in the given JNI environment.
37-
/// - `init(fromJNI:in:)`: intializes a Swift value from the JNI value (of
37+
/// - `init(fromJNI:in:)`: initializes a Swift value from the JNI value (of
3838
/// type `JNIType`) in the given JNI environment.
3939
///
4040
/// The protocol also provides hooks to tie into JNI, including operations to

Sources/_Subprocess/Platforms/Subprocess+Darwin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ extension Subprocess {
224224
public var launchRequirementData: Data? = nil
225225
/// An ordered list of steps in order to tear down the child
226226
/// process in case the parent task is cancelled before
227-
/// the child proces terminates.
227+
/// the child process terminates.
228228
/// Always ends in sending a `.kill` signal at the end.
229229
public var teardownSequence: [TeardownStep] = []
230230
/// A closure to configure platform-specific

Sources/_Subprocess/Platforms/Subprocess+Linux.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ extension Subprocess {
123123
public var createSession: Bool = false
124124
/// An ordered list of steps in order to tear down the child
125125
/// process in case the parent task is cancelled before
126-
/// the child proces terminates.
126+
/// the child process terminates.
127127
/// Always ends in sending a `.kill` signal at the end.
128128
public var teardownSequence: [TeardownStep] = []
129129
/// A closure to configure platform-specific

Sources/_Subprocess/Platforms/Subprocess+Windows.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ extension Subprocess {
276276
public struct ConsoleBehavior: Sendable, Hashable {
277277
enum Storage: Sendable, Hashable {
278278
case createNew
279-
case detatch
279+
case detach
280280
case inherit
281281
}
282282

@@ -293,7 +293,7 @@ extension Subprocess {
293293
/// inherit its parent's console (the default).
294294
/// The new process can call the `AllocConsole`
295295
/// function at a later time to create a console.
296-
public static let detatch: Self = .init(.detatch)
296+
public static let detach: Self = .init(.detach)
297297
/// The subprocess inherits its parent's console.
298298
public static let inherit: Self = .init(.inherit)
299299
}
@@ -658,7 +658,7 @@ extension Subprocess.Environment {
658658
extension Subprocess {
659659
/// A platform independent identifier for a subprocess.
660660
public struct ProcessIdentifier: Sendable, Hashable, Codable {
661-
/// Windows specifc process identifier value
661+
/// Windows specific process identifier value
662662
public let processID: DWORD
663663
/// Windows specific thread identifier associated with process
664664
public let threadID: DWORD
@@ -755,7 +755,7 @@ extension Subprocess.Configuration {
755755
switch self.platformOptions.consoleBehavior.storage {
756756
case .createNew:
757757
flags |= CREATE_NEW_CONSOLE
758-
case .detatch:
758+
case .detach:
759759
flags |= DETACHED_PROCESS
760760
case .inherit:
761761
break
@@ -853,7 +853,7 @@ extension Subprocess.Configuration {
853853
}
854854
// The first parameter of CreateProcessW, `lpApplicationName`
855855
// is optional. If it's nil, CreateProcessW uses argument[0]
856-
// as the execuatble name.
856+
// as the executable name.
857857
// We should only set lpApplicationName if it's different from
858858
// argument[0] (i.e. executablePathOverride)
859859
var applicationName: String? = nil
@@ -1025,7 +1025,7 @@ extension FileDescriptor {
10251025
}
10261026

10271027
func read(upToLength maxLength: Int) async throws -> Data {
1028-
// TODO: Figure out a better way to asynchornously read
1028+
// TODO: Figure out a better way to asynchronously read
10291029
return try await withCheckedThrowingContinuation { continuation in
10301030
DispatchQueue.global(qos: .userInitiated).async {
10311031
var totalBytesRead: Int = 0
@@ -1060,7 +1060,7 @@ extension FileDescriptor {
10601060
}
10611061
break
10621062
} else {
1063-
// We succesfully read the current round
1063+
// We successfully read the current round
10641064
totalBytesRead += Int(bytesRead)
10651065
}
10661066

@@ -1083,7 +1083,7 @@ extension FileDescriptor {
10831083
}
10841084

10851085
func write<S: Sequence>(_ data: S) async throws where S.Element == UInt8 {
1086-
// TODO: Figure out a better way to asynchornously write
1086+
// TODO: Figure out a better way to asynchronously write
10871087
try await withCheckedThrowingContinuation { (
10881088
continuation: CheckedContinuation<Void, Error>
10891089
) -> Void in

Sources/_Subprocess/Subprocess+Configuration.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ extension Subprocess {
4646
public var environment: Environment
4747
/// The working directory to use when running the executable.
4848
public var workingDirectory: FilePath
49-
/// The platform specifc options to use when
49+
/// The platform specific options to use when
5050
/// running the subprocess.
5151
public var platformOptions: PlatformOptions
5252

@@ -532,7 +532,7 @@ extension Subprocess.Environment : CustomStringConvertible, CustomDebugStringCon
532532
case .custom(let customDictionary):
533533
return customDictionary.dictionaryDescription
534534
case .inherit(let updateValue):
535-
return "Inherting current environment with updates: \(updateValue.dictionaryDescription)"
535+
return "Inheriting current environment with updates: \(updateValue.dictionaryDescription)"
536536
}
537537
}
538538

Sources/_Subprocess/Subprocess+IO.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extension Subprocess {
6565
}
6666

6767
/// Subprocess should read no input. This option is equivalent
68-
/// to bind the stanard input to `/dev/null`.
68+
/// to bind the standard input to `/dev/null`.
6969
public static var noInput: Self {
7070
return .init(method: .noInput)
7171
}
@@ -100,7 +100,7 @@ extension Subprocess {
100100
self.method = method
101101
}
102102

103-
/// Subprocess shold dicard the child process output.
103+
/// Subprocess should discard the child process output.
104104
/// This option is equivalent to binding the child process
105105
/// output to `/dev/null`.
106106
public static var discard: Self {
@@ -148,7 +148,7 @@ extension Subprocess {
148148
self.method = method
149149
}
150150

151-
/// Subprocess shold dicard the child process output.
151+
/// Subprocess should discard the child process output.
152152
/// This option is equivalent to binding the child process
153153
/// output to `/dev/null`.
154154
public static var discard: Self {
@@ -160,7 +160,7 @@ extension Subprocess {
160160
public static var redirectToSequence: Self {
161161
return .init(method: .collected(128 * 1024))
162162
}
163-
/// Subprocess shold write the child process output
163+
/// Subprocess should write the child process output
164164
/// to the file descriptor specified.
165165
/// - Parameters:
166166
/// - fd: the file descriptor to write to
@@ -257,7 +257,7 @@ extension Subprocess {
257257
case .customWrite(let readFd, let writeFd):
258258
// The parent fd should have been closed
259259
// in the `body` when writer.finish() is called
260-
// But in case it isn't call it agian
260+
// But in case it isn't call it again
261261
try writeFd?.close()
262262
$0 = .customWrite(readFd, nil)
263263
}

Sources/_Subprocess/Subprocess+Teardown.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ extension Subprocess {
7979
try await Task.sleep(nanoseconds: allowedNanoseconds)
8080
return .processStillAlive
8181
} catch {
82-
// teardown(using:) cancells this task
82+
// teardown(using:) cancels this task
8383
// when process has exited
8484
return .processHasExited
8585
}

SwiftKit/src/main/java/org/swift/swiftkit/SwiftValueWitnessTable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public abstract class SwiftValueWitnessTable {
5656
MemoryLayout.PathElement.groupElement("vwt"));
5757

5858
/**
59-
* Given the address of Swift type metadata for a type, return the addres
59+
* Given the address of Swift type metadata for a type, return the address
6060
* of the "full" type metadata that can be accessed via fullTypeMetadataLayout.
6161
*/
6262
public static MemorySegment fullTypeMetadata(MemorySegment typeMetadata) {

USER_GUIDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Note that we are passing the Jar file in the `classpath` argument when initializ
221221

222222
### Downcasting
223223

224-
All Java classes available in Swift provide `is` and `as` methods to check whether an object dynamically matches another type. The `is` operation is the equivalent of Java's `instanceof` and Swift's `is` operator, and will checkin whether a given object is of the specified type, e.g.,
224+
All Java classes available in Swift provide `is` and `as` methods to check whether an object dynamically matches another type. The `is` operation is the equivalent of Java's `instanceof` and Swift's `is` operator, and will checking whether a given object is of the specified type, e.g.,
225225

226226
```swift
227227
if myObject.is(URL.self) {
@@ -620,7 +620,7 @@ The project is still very early days, however the general outline of using this
620620
- These `.swiftinterface` files are imported by jextract-swift which generates `*.java` files
621621
- The generated Java files contain generated code for efficient native invocations.
622622

623-
You can then use Swift libraries in Java just by calling the apropriate methods and initializers.
623+
You can then use Swift libraries in Java just by calling the appropriate methods and initializers.
624624

625625
## `jextract-swift`: Generating Java bridging files
626626

0 commit comments

Comments
 (0)