Skip to content

Commit dfb10c6

Browse files
committed
Aligned usage of class, clazz, klass
1 parent 11aeb3d commit dfb10c6

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

Sources/ITKSuperBuilder/src/ITKSuperBuilder.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,15 @@ static BOOL ITKMethodIsSuperTrampoline(Method method) {
138138
Looking at the method implementation we can also skip subsequent super calls.
139139
*/
140140
Class clazz = object_getClass(obj);
141-
Class superclazz = class_getSuperclass(clazz);
141+
Class superclass = class_getSuperclass(clazz);
142142
do {
143-
let superclassMethod = class_getInstanceMethod(superclazz, _cmd);
143+
let superclassMethod = class_getInstanceMethod(superclass, _cmd);
144144
let sameMethods = class_getInstanceMethod(clazz, _cmd) == superclassMethod;
145145
if (!sameMethods && !ITKMethodIsSuperTrampoline(superclassMethod)) {
146146
break;
147147
}
148-
clazz = superclazz;
149-
superclazz = class_getSuperclass(clazz);
148+
clazz = superclass;
149+
superclass = class_getSuperclass(clazz);
150150
} while (1);
151151

152152
struct objc_super *_super = &_threadSuperStorage;

Sources/InterposeKit/InterposeError.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@ extension InterposeError: Equatable {
7676

7777
public var errorDescription: String {
7878
switch self {
79-
case .methodNotFound(let klass, let selector):
80-
return "Method not found: -[\(klass) \(selector)]"
81-
case .methodNotDirectlyImplemented(let klass, let selector):
82-
return "Method not directly implemented: -[\(klass) \(selector)]"
83-
case .implementationNotFound(let klass, let selector):
84-
return "Implementation not found: -[\(klass) \(selector)]"
85-
case .revertCorrupted(let klass, let selector, let IMP):
86-
return "Unexpected Implementation in -[\(klass) \(selector)]: \(String(describing: IMP))"
87-
case .failedToAllocateClassPair(let klass, let subclassName):
88-
return "Failed to allocate class pair: \(klass), \(subclassName)"
79+
case .methodNotFound(let `class`, let selector):
80+
return "Method not found: -[\(`class`) \(selector)]"
81+
case .methodNotDirectlyImplemented(let `class`, let selector):
82+
return "Method not directly implemented: -[\(`class`) \(selector)]"
83+
case .implementationNotFound(let `class`, let selector):
84+
return "Implementation not found: -[\(`class`) \(selector)]"
85+
case .revertCorrupted(let `class`, let selector, let IMP):
86+
return "Unexpected Implementation in -[\(`class`) \(selector)]: \(String(describing: IMP))"
87+
case .failedToAllocateClassPair(let `class`, let subclassName):
88+
return "Failed to allocate class pair: \(`class`), \(subclassName)"
8989
case .kvoDetected(let obj):
9090
return "Unable to hook object that uses Key Value Observing: \(obj)"
9191
case .objectPosingAsDifferentClass(let obj, let actualClass):

0 commit comments

Comments
 (0)