|
Why wouldn't all my C functions share the same environment ? What operations change this environment ?
Sorry for any confusion Gaspard, only lua_setfenv() changes the environment so you should be fine if you don't call lua_setfenv(). My confusion when I last worked with function/userdata environments came from the fact that my C functions inherited their environment from the C module loader and this surprised me (although it's more or less documented) but in retrospect this doesn't seem relevant to your question.
- Peter Odding