File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 14
14
* under the License.
15
15
*/
16
16
17
+ #import < objc/message.h>
17
18
#import < objc/runtime.h>
18
19
#import " NSMethodSignature+OCMAdditions.h"
19
20
#import " NSObject+OCMAdditions.h"
20
21
21
-
22
22
@implementation NSObject (OCMAdditions)
23
23
24
24
+ (IMP )instanceMethodForwarderForSelector : (SEL )aSelector
25
25
{
26
- // use sel_registerName() and not @selector to avoid warning
27
- SEL selectorWithNoImplementation = sel_registerName (" methodWhichMustNotExist::::" );
28
-
29
26
#ifndef __arm64__
30
27
static NSMutableDictionary *_OCMReturnTypeCache;
31
28
@@ -49,10 +46,10 @@ + (IMP)instanceMethodForwarderForSelector:(SEL)aSelector
49
46
}
50
47
51
48
if (needsStructureReturn)
52
- return class_getMethodImplementation_stret ([ NSObject class ], selectorWithNoImplementation) ;
49
+ return _objc_msgForward_stret ;
53
50
#endif
54
51
55
- return class_getMethodImplementation ([ NSObject class ], selectorWithNoImplementation) ;
52
+ return _objc_msgForward ;
56
53
}
57
54
58
55
+ (void )enumerateMethodsInClass : (Class )aClass usingBlock : (void (^)(Class cls, SEL sel))aBlock
You can’t perform that action at this time.
0 commit comments