Thank you Michal.My question is: How to change local variables (from C code) ? I read several threads about merging upvalues, and did some experiments but my current understanding is that it will not work because local variables are registers and are not stored in _ENV. Is this possible ? How ?Take a look at my attempt here: http://snippets.luacode.org/snippets/title_88