Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

Commit

Permalink
Fix up GTMMethodCheck to work with ENABLE_STRICT_OBJC_MSGSEND=YES.
Browse files Browse the repository at this point in the history
Also ignores another class which does not inherit from NSObject.

DELTA=4 (3 added, 0 deleted, 1 changed)
DELTA_BY_EXTENSION=m=4

git-svn-id: http://google-toolbox-for-mac.googlecode.com/svn/trunk@677 7dc7ac4e-7543-0410-b95c-c1676fc8e2a3
  • Loading branch information
gtm.daemon committed Jun 9, 2014
1 parent 6e04dd3 commit 4324c91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion DebugUtils/GTMMethodCheck.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 4324c91

Please sign in to comment.