Skip to content

Commit 3f3a314

Browse files
committed
Fixed typos
1 parent dcf6a68 commit 3f3a314

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

Sources/InterposeKit/AnyHook.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class AnyHook {
1919

2020
/// The possible task states
2121
public enum State: Equatable {
22-
/// The task is prepared to be nterposed.
22+
/// The task is prepared to be interposed.
2323
case prepared
2424

2525
/// The method has been successfully interposed.
@@ -51,7 +51,7 @@ public class AnyHook {
5151
return self
5252
}
5353

54-
/// Revert the interpose hoook.
54+
/// Revert the interpose hook.
5555
@discardableResult public func revert() throws -> AnyHook {
5656
try execute(newState: .prepared) { try resetImplementation() }
5757
return self

Sources/InterposeKit/InterposeSubclass.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class InterposeSubclass {
8888
}
8989

9090
class var supportsSuperTrampolines: Bool {
91-
NSClassFromString("SuperBuilder")?.value(forKey: "isSupportedArchitecure") as? Bool ?? false
91+
NSClassFromString("SuperBuilder")?.value(forKey: "isSupportedArchitecture") as? Bool ?? false
9292
}
9393

9494
func addSuperTrampoline(selector: Selector) {

Sources/InterposeKit/ObjectHook.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ extension Interpose {
142142
//
143143
// This codepath will be hit if the super helper is missing.
144144
// We could recreate the whole class at runtime and rebuild all hooks,
145-
// but that seesm excessive when we have a trampoline at our disposal.
145+
// but that seems excessive when we have a trampoline at our disposal.
146146
Interpose.log("Reset of -[\(`class`).\(selector)] not supported. No IMP")
147147
throw InterposeError.resetUnsupported("No Original IMP found. SuperBuilder missing?")
148148
}

Sources/InterposeKit/Watcher.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import MachO.dyld
77
// MARK: Interpose Class Load Watcher
88

99
extension Interpose {
10-
// Separate definitions to have more eleveant calling syntax when completion is not needed.
10+
// Separate definitions to have more relevant calling syntax when completion is not needed.
1111

1212
/// Interpose a class once available. Class is passed via `classParts` string array.
1313
@discardableResult public class func whenAvailable(_ classParts: [String],

Sources/SuperBuilder/include/ITKSuperBuilder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ There are a few important details:
5454
+ (BOOL)isSuperTrampolineForClass:(Class)originalClass selector:(SEL)selector;
5555

5656
/// x86-64 and ARM64 are currently supported.
57-
@property(class, readonly) BOOL isSupportedArchitecure;
57+
@property(class, readonly) BOOL isSupportedArchitecture;
5858

5959
#if (defined (__arm64__) || defined (__x86_64__)) && __APPLE__
6060
/// Helper that does not exist if architecture is not supported.
61-
+ (BOOL)isCompileTimeSupportedArchitecure;
61+
+ (BOOL)isCompileTimeSupportedArchitecture;
6262
#endif
6363

6464
@end

Sources/SuperBuilder/src/ITKSuperBuilder.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static IMP ITKGetTrampolineForTypeEncoding(__unused const char *typeEncoding) {
4141

4242
@implementation SuperBuilder
4343

44-
+ (BOOL)isSupportedArchitecure {
44+
+ (BOOL)isSupportedArchitecture {
4545
#if defined (__arm64__) || defined (__x86_64__)
4646
return YES;
4747
#else
@@ -50,8 +50,8 @@ + (BOOL)isSupportedArchitecure {
5050
}
5151

5252
#if defined (__arm64__) || defined (__x86_64__)
53-
+ (BOOL)isCompileTimeSupportedArchitecure {
54-
return [self isSupportedArchitecure];
53+
+ (BOOL)isCompileTimeSupportedArchitecture {
54+
return [self isSupportedArchitecture];
5555
}
5656
#endif
5757

@@ -62,7 +62,7 @@ + (BOOL)isSuperTrampolineForClass:(Class)originalClass selector:(SEL)selector {
6262
}
6363

6464
+ (BOOL)addSuperInstanceMethodToClass:(Class)originalClass selector:(SEL)selector error:(NSError **)error {
65-
if (!self.isSupportedArchitecure) {
65+
if (!self.isSupportedArchitecture) {
6666
let msg = @"Unsupported Architecture. (Support includes ARM64 and x86-64 )";
6767
ERROR_AND_RETURN(SuperBuilderErrorCodeArchitectureNotSupported, msg)
6868
}

0 commit comments

Comments
 (0)