/* Continuation function for 'pcall' and 'xpcall'. Both functions already pushed a 'true' before doing the call, so in case of success 'finishpcall' only has to return everything in the stack minus 'extra' values (where 'extra' is exactly the number of items to be ignored).  */
static int finishpcall(lua_State *L, int status, lua_KContext extra)
/* Continuation function for 'pcall' and 'xpcall'. Both functions already pushed a 'true' before doing the call, so in case of success 'finishpcall' only has to return everything in the stack minus 'extra' values (where 'extra' is exactly the number of items to be ignored).  */
static int finishpcall(lua_State *L, int status, lua_KContext extra)
{
    lua_pushboolean(L, 0);
    lua_pushvalue(L, -2);
    return 2;
  }
  else
    return lua_gettop(L) - (int)extra;
}