GCC Preprocessor for inline method name

Posted by Maz on Stack Overflow See other posts from Stack Overflow or by Maz
Published on 2010-06-12T17:18:04Z Indexed on 2010/06/12 17:22 UTC
Read the original article Hit count: 196

Filed under:
|

Hi

I'm working on a project where I have code like the following:

#define NAME() Array

inline NAME()* NAME()_init (void* arg0){return (NAME()*)Object_init(arg0);}

But I get the following result:

inline Array* Array _init (void* arg0){return (Array*)Object_init(arg0);}

With a space between the "Array" and the "_init" Because this is a function name, I obviously do not want the space. Does anyone know how to get the space out?

Thanks.

© Stack Overflow or respective owner

Related posts about c

    Related posts about gcc