Slang: Suppressing 'static' declarations

Eddie Cottongim cottonsqueak at earthlink.net
Thu Jan 12 09:49:14 UTC 2006


Hi,

I'm trying to write a plugin that will call some hand-coded c functions 
in another file. It also needs to share variables via 'extern' with this 
other file.

So in my plugin(class side) I have something like:

declareCVarsIn: aCCodeGenerator
aCCodeGenerator var: 'height' declareC: 'int height'.
aCCodeGenerator var: 'width' declareC: 'int width'

This generates, in C,
static int height;
static int width;

If I understand this right, the 'static' keeps me from also making these 
extern, and also prevents me from sharing the other way by using 
'extern' in the other file. I guess having lots of externs would clog up 
the namespace but for now I'd just like to get this to work.

I see in the CCodeGenerator where the static is added, but I'm not sure 
what the proper way is to suppress this. Any hints?

I am working in Squeak 3.7 (its the latest version for which I have 
managed to get VM generation going).

Thanks,
Eddie




More information about the Squeak-dev mailing list