lua-users home
lua-l archive

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


> On Mar 13, 2015, at 5:00 AM, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> 
> But I'm sure you know all this and I'm not answering your question.
> 
> I think the only real solution is to avoid stripping debug information
> and search the upvalue list for an upvalue named _ENV.
> 
> If you can change the app, then perhaps you can add a special entry
> in environments (both the global one and custom ones) and look in
> the list of upvalues to see if they are a table with that entry.
> This would then work even after stripping debug information.
> 

Thanks for the info and yes I’d figured out the details of _ENV but it was good to have it confirmed. I’d pretty much come to the same conclusion; that I will have to enforce a “decoration” on the environment tables so that they can be identified (I cannot rely on not stripping debug info sadly).

Thanks for the help!

—Tim