Robert Feldt wrote:
On 1/10/06, Nicolas Cannasse <[EMAIL PROTECTED]> wrote:

Robert Feldt wrote:

Can you explain how the global context works when linking modules?

Globals are "per module" at runtime so when linking it's normal that
globals are not merged either. (this ensure also the sandbox : several
versions of the same module can be loaded and they will not share the
same global table). If you want to communicate between modules you need
to use the $export table.


Yes, it's natural. Sorry I had previously missed the $exports builtin.
So $loader.loadmodule (& loadprim?) returns an object whose fields you
can set in the exporting module, right? Looks good.

Ok,

Yes exactly.
It's far better than C for example where you can't control appropriatly what is getting exported.

Nicolas

--
Neko : One VM to run them all (http://nekovm.org)

Reply via email to