From a8c45b2d81b4a1ae00440c472659f8728c303693 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Mon, 9 Jun 2014 17:30:07 +0000 Subject: Fix up GTMMethodCheck to work with ENABLE_STRICT_OBJC_MSGSEND=YES. Also ignores another class which does not inherit from NSObject. DELTA=4 (3 added, 0 deleted, 1 changed) DELTA_BY_EXTENSION=m=4 --- DebugUtils/GTMMethodCheck.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'DebugUtils/GTMMethodCheck.m') diff --git a/DebugUtils/GTMMethodCheck.m b/DebugUtils/GTMMethodCheck.m index 650d255..c18ada8 100644 --- a/DebugUtils/GTMMethodCheck.m +++ b/DebugUtils/GTMMethodCheck.m @@ -52,6 +52,7 @@ static BOOL ConformsToNSObjectProtocol(Class cls) { #if GTM_IPHONE_SDK || (strcmp(className, "Object") == 0) || (strcmp(className, "UIKeyboardCandidateUtilities") == 0) + || (strcmp(className, "JSExport") == 0) #endif ) { return YES; @@ -157,7 +158,9 @@ void GTMMethodCheckMethodChecker(void) { // COV_NF_END } if (methodCheckerInfo.dli_fbase == methodInfo.dli_fbase) { - objc_msgSend(cls, selector); + typedef void (*GTMMethodCheckMethod)(Class, SEL); + GTMMethodCheckMethod func = (GTMMethodCheckMethod)objc_msgSend; + func(cls, selector); } } } -- cgit v1.2.3