[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to test if a userdata has an environment table
- From: Peter Odding <peter@...>
- Date: Tue, 11 Jan 2011 21:03:44 +0100
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