I am confusing about one question.See an example:
-(void)DIYLog:(NSString *)format, ...
{
NSLog(...);
}
It's just an example for fun. We all know that we can't pass "..." as parameters for NSLog. So I'm Curious about passing one "variable parameters" to another. I already know that params are passed by register or stack, But, The key point is , how can I implement it in Objective-C or C.
I think I make you misunderstand. NSLog is just an example to be explained. Let me make another. It's about passing params to id objc_msgSend(id self, SEL op, ...).
-(void)DIY_msgSend:(id)target selector:(SEL)op params:(id)param, ...
{
objc_msgSend(target, op, ...);
}
So, the key is, how I can pass those variable parameters to another function which also need variable parameters.