Accessing the Interpreters variables from a Plugin

Andreas Raab andreas.raab at gmx.de
Sat Nov 15 15:53:54 UTC 2003


> Is there an easy portable way to access the interpreters variables
> from a plugin?

Yes. Link it with the VM, e.g., don't make it an external plugin. External
plugins should continue to work even if the VMs internal change and
therefore they only get a limited interface via the interpreter proxy. If
you really depend on the internals of the VM you should link with the VM
directly. Simply use something like:

extern int rootTableCount;

to declare it and then use it in whatever weird ways you want to ;-)

Note that on Linux (and other Unixes but definitely not on all platforms)
you can actually link your plugin against the Squeak VM and therefore
defacto have external plugins that depend directly on the VM (e.g., use the
above declaration and add -lSqueakVM or somesuch in order for the linker to
see that the variable/function is in the Squeak VM). It's definitely not
"good style", but maybe helpful in your state of development.

Cheers,
  - Andreas




More information about the Squeak-dev mailing list