Skip to content

Commit

Permalink
Typed objc_msgSend
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewion committed Jun 10, 2015
1 parent b03cd19 commit 523e6c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion NSObject+Coby.m
Expand Up @@ -11,7 +11,8 @@ - (id)send:(NSString *)method {

// Basically an alias for `performSelector:withObject:`
- (id)send:(NSString *)method with:(id)object {
return objc_msgSend(self, NSSelectorFromString(method), object);
id (*typed_msgSend)(id, SEL, id) = (void *)objc_msgSend;
return typed_msgSend(self, NSSelectorFromString(method), object);
}

// # Try
Expand Down

0 comments on commit 523e6c3

Please sign in to comment.