[PD-dev] standard c - Was:Re: PD-cvs Digest, Vol 7, Issue 8

Thomas Grill gr at grrrr.org
Thu Sep 8 15:25:53 CEST 2005


Hi Mathieu,

>   3. pd/src m_conf.c,1.1.1.3.12.1,1.1.1.3.12.2 (Mathieu Bouchard)
>  
>
there's a problem with the latest changes here....
it's like this:

#define S(name) void name##_setup(void); name##_setup();

void conf_init(void)
{
    S(g_array) S(g_canvas) S(g_guiconnect)
 ....
}


in good old c standard variables or external functions have to be 
defined at the beginning of a code block.
The preprocessor run yields something like
void g_array_setup(void); g_array_setup(); void g_canvas_setup(void); 
g_canvas_setup();
where definitions are interspersed with code... gcc does swallow it, but 
MSVC doesn't.

best greetings,
Thomas





More information about the Pd-dev mailing list