> Observe, however, that [B] does not make the latter available to the
> Lua state. So the coroutine in [B] simply fails when trying to call a
> nil value, and my_pcall() is never called at all.
Thank you, I missed that indeed.
Registering "my_pcall" as well changes the behavior and the "no longer unreachable" code after pcall is called.
> I would like to point out that for whatever strange reason you seem
> determined to say that lua_pcall() or Lua's reference manual have a
> bug, ...
No, that is not what I said.
I'm trying to find a solution to a specific problem - either by building a solution around Lua
or by modifying the Lua kernel itself if there is no other solution.
The program should help to test out if a particular solution works or not.
Or by documenting the restrictions which might exclude using some existing libraries.