Re: RH7/CORBA compile queries (was RH7/gnome compile queries)



> (here's the line,  there are several of them and they all give the same
error)
>
> #define ENCODER_DEC(typename) \
> void giop_encoder_##typename##(GIOPSendBuffer *send_buffer, \
>        const typename *mem)
>
>
> Could someone explain this C (preprocessor) feature to me?

It's explained fully in the gcc info file under ## I think, but basically,
it puts whatever is in typename into the define. So for ENCODER_DEC(wibble)
it will expand to
void giop_encoder_wibble(GIOPSendBuffer *send_buffer, const wibble *mem)

iain





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]