3 ms·
Good tip, thanks! I think you can use any of C++ exceptions, explicit returns, or setlongjmp(). setlongjmp() doesn't work well with C++ destructors. The inte
by chubot 10y ago
Good tip, thanks!
I think you can use any of C++ exceptions, explicit returns, or setlongjmp(). setlongjmp() doesn't work well with C++ destructors. The interpreter loop just has to check for a flag set by the signal handler and then pop back to the interactive loop.
I noticed that the Lua parser uses setlongjmp() when compiled as C, but C++ exceptions when compiled as C++.