lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> On August 19, 2005, Rici Lake wrote:
> In 5.1, CFunctions will have an environment table just like Lua
> functions. So that could be assigned to the package table. (In fact, I
> think the 5.1 loadlib system does exactly that. It certainly seems to
> have a dynamic unloading __gc method, at least on some OS's.)

I am using 5.1(work6). Since the native library that I am working on is all 'C'
I am interested in any benefits this environment table provides and eventually
in resolving my originaly problem any more naturaly if possible.

Could you please explain how this environment table could be used?

> But I'm still not convinced that unloading dynamic modules is a good
> idea.

Just to be sure, I do not want to unload my module. My module needs an exit
hook regardless of whether it way unloaded explicitly or implicitly (say due to

As I was writing this maybe my answer is to use the 'C' atexit() function which
is available in most systems. Hmmm.

Vijay Aswadhati