lua-users home
lua-l archive

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


As far as I remember, CallInfo.extra is used in two contexts. While
a function invocation is suspended (L->status == LUA_YIELD), the
field L->ci->extra keeps the original value for L->ci->func, because
L->ci->func has to change to "simulate" a new activation record
for whoever manipulates the suspended thread.

For a CallInfo that refers to a yieldable protected call
(ci->callstatus & CIST_YPCALL), ci->extra keeps the level
of the function being called, which is the level to restore
the stack in case of an error.

-- Roberto

Brilliant, thanks for the quick reply. I've added context sensitive
persisting and validation based on this, and at least the test cases
still pass. Time will tell if I made a wrong assumption somewhere.

Thanks again,
Florian