3 ms·
objc_msgSend accepts a variable number of arguments, and it needs to forward those to the method implementation. This is not possible to do in pure C.
by saagarjha 9y ago
objc_msgSend accepts a variable number of arguments, and it needs to forward those to the method implementation. This is not possible to do in pure C.
- colejohnson66 9y agoWhat about just forwarding the var_args variable?
- saagarjha 9y agoYou'd have to pass around a va_list everywhere and parse it at the call site. This adds overhead that you probably don't want to deal with, especially since objc_msgSend is probably the hottest code path in any Objective-C program.