> The changes in lua.c functions seem very limited and I could get away with using a flag variable and some if statements to handle the code paths?
This will have to deal with ABI differences explicitly, while the approach I outlined earlier would avoid that. Not impossible in principle, but I would say messier and buggier. Then again, if the journey is the reward, why not?