[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Manipulating local variables from C in Lua 5.2.
- From: Javier Guerra Giraldez <javier@...>
- Date: Fri, 6 Sep 2013 08:52:30 -0500
On Fri, Sep 6, 2013 at 7:29 AM, Rob Kendrick <email@example.com> wrote:
> On Fri, Sep 06, 2013 at 02:26:06PM +0200, Karol Drożak wrote:
>> How can I manipulating local variables from C in Lua 5.2?
> In general: don't.
"local" to a lexically-scoped language means "local to the code
specified in this piece of text". a C function is at another lexical
context, so by definition it shouldn't be able to meddle with Lua
of course, there are ways to do it, either via the debug API, or
hacking the interpreter itself. But neither of those are meant to be
used as "normal execution", and that's by design, not because of