MGD swarm-support April 2, 2001 >>>>> "PJ" == Paul E Johnson writes: PJ> But I ran into a little trouble. I know there was a way around it. PJ> Suppose I declare PJ> unsigned getMyUnsignedFunction () PJ> { PJ> ---want to use IVARS in here PJ> } PJ> The compiler goes crazy because it can't find any of the PJ> IVARS. Know what I mean? It says all the ivars are undeclared. You can pass the whole object just as efficiently.. You might also want to consider a macro, so that there isn't the need for a "->" to get the the ivars.. #import #import @interface Foo: CreateDrop { int a; } - (int)getA; @end @implementation Foo static void bar (Foo *foo) { foo->a = 1; } - (void)bar { bar (self); } - (int)getA { return a; } @end int main (int argc, const char **argv) { initSwarm (argc, argv); { id foo = [Foo create: globalZone]; [foo bar]; printf ("a: %u\n", [foo getA]); } } /* Local Variables: compile-command: "$SWARMHOME/bin/libtool-swarm --mode=link gcc -D_GNU_SOURCE -o Foo -g -Wno-import -I$SWARMHOME/include/swarm -L$SWARMHOME/lib/swarm Foo.m -lswarm -lobjc" End: */