lua-users home
lua-l archive

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

On Tue, Feb 21, 2012 at 12:28 PM, Jay Carlson <> 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?