[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Idea (unsafe): a variant of lua_getstack
- From: Jay Carlson <nop@...>
- Date: Tue, 21 Feb 2012 12:33:18 +0000
On Tue, Feb 21, 2012 at 12:28 PM, Jay Carlson <nop@nop.com> wrote:
> Another possibility is to have something a lot like xpcall:
> call_with_locals(f), which calls f with argument _L referring to its
> own locals. _L would be implemented as a userdata with the address you
> describe in it, and exit from call_with_locals would NULL it out.
> xpcall is our unwind-protect....
This doesn't work. I'm thinking in C. A tail call from f will destroy
the locals without us being told about it, right?
Jay