lua-users home
lua-l archive

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

On Apr 17, 2007, at 5:04 AM, Jesús Ruiz de Infante wrote:

You are right. Static variables contained in DLLs are not shared by the processes linked against them. At least not on Linux. Is this point standarized?

I've never seen a formal requirement for it, but every single library system does things this way. Windows DLLs can have libraries that have globally shared segments, I believe, but it's not the default.

It should be guaranteed however that the ident pointer passed to openlog() points "for ever" to the ident string. In addition, storing a pointer to an internal Lua string is not a good idea, even if it is stored in the module enviroment (?). Hence the userdata.

There's no document that I'm aware of that exactly defines the contract between the Lua interpreter and extensions written in C. My assumption has been that any reference to an object will keep the object allocated and in the same location. If that's not true I'd really like to know.

Gé Weijers