'How to implement a function with a void parameter like 'objc_msgSend'

I'am coding with objective-c. I found that the parameter and return value of 'objc_msgSend' are all void types. But I can cast it to an appropriate function pointer type before call it. My question is how can I implement a function with void type parameter and return value, and call it like 'objc_msgSend' ? Thanks!

// declaration
OBJC_EXPORT void objc_msgSend(void /* id self, SEL op, ... */ )
    OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0);

// how I used it.
 ((void(*)(id, SEL))(void *)objc_msgSend)(self, @selector(originalMethod));



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source