lua-users home
lua-l archive

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


> - for WIN32, the Lua vm is also a DLL and the dynamically loaded
> 'interface DLL' is linked to it's stub. (otherwise, how does 
> the interface
> DLL gain access to the lua vm functional interface?)

I think DLLs can be linked statically and dynamically in win32 so you
wouldnt necessarily need a library for the extension DLL to link with but I
dont think you can call from a DLL to the exe as its the DLL that supplies
the functionality for being able to call it dynamically. So you would have
to make the Lua VM a DLL if the extension DLL needed to call it. Since you
cant really assume that all extension DLLs will not contain any Lua code
both should really be DLLs.

> - the vm is unmodified, including through the use of 4.1's
> LUA_USERSTATE. Which, makes programming context based
> interfaces tough, since you can't inject anything into the Lua
> state structure.

This is a problem which I am not really familiar with since I am still using
4.0 (waiting for toLua 4.1 and need a static codebase for the game). I can
see your point however. Mmmmm.

But this problem doesnt just affect libraries as DLLs, trying to link static
DLLs would have the same problem. All I can suggest from looking at the
problem briefly is that LUA_USERSTATE is a pointer to the head of a list of
library data structures and each library can attach its own data to the
list. The data cannot be compiled it, it will have to be runtime.

Regards,
Nick