Re: sandboxing embedded 5.2
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: sandboxing embedded 5.2
- From: Jeremy Carter <jeremy@...>
- Date: 2012年9月22日 13:42:10 -0400
Sorry for the long post, a shorter version of my question is:
When running some Lua script through the C API, and the script assigns
a custom _ENV (a sandbox whitelist) and then assigns some variables,
how can I access those variables later from the C API?
Using the same lua_State that was used to run the script, with the
lua_getglobal() function, all the assigned variables are returning as
nil. Am I missing something really important here? I've scoured
through the docs, the mailing list archives, google, and stack
overflow, and I can't find a straight answer to this... I see lots of
references to the Lua function debug.setupvalue(), but I don't
understand what that does or if I should be trying to use that to
solve my problem.