mercredi 29 avril 2015

Variadic function calling a variadic macro

I have an inline variadic function
inline int foo(...)
I need foo() to call a macro (let's call it MACRO), which is also variadic.
Basically I need foo() to pass all its input parameters to MACRO. Redefining foo() as another macro would be an easy solution because of __VA_ARGS__ option, but I also need foo() to return a value.
Note: I am trying to interface two parts of already written code and I am not allowed to change them. foo(...) is used in the first part of code and MACRO is defined in the second part. Only thing I am supposed to do is to define a foo() which uses MACRO and I can't because they are both variadic.

Aucun commentaire:

Enregistrer un commentaire