Last active
December 20, 2015 05:29
-
-
Save ddeville/6078492 to your computer and use it in GitHub Desktop.
objc_msgSend cast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So: | |
id boxedValue = objc_msgSend(self, mappingSelector, instance, value, boxingParameters); | |
would become: | |
id boxedValue = ((id (*)(id, SEL, id, id, id))objc_msgSend)(self, mappingSelector, instance, value, boxingParameters); | |
The first `id` and `SEL` are basically `self` and `_cmd`, the first 2 arguments in any objc_msgSend. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is an easy way to catch these errors: