public static Tuple <T1, T2, T3> GetTuple <T1, T2, T3>(
this IntPtr L,
int index,
Func <IntPtr, int, T1> getor1,
Func <IntPtr, int, T2> getor2,
Func <IntPtr, int, T3> getor3)
{
int _lastTopIndex = Lua.lua_gettop(L);
//Get First Item
Lua.lua_rawgeti(L, index, 1);
var value1 = getor1(L, -1);
Lua.lua_settop(L, _lastTopIndex);
//Get Second Item
Lua.lua_rawgeti(L, index, 2);
var value2 = getor2(L, -1);
Lua.lua_settop(L, _lastTopIndex);
//Get Thrird Item
Lua.lua_rawgeti(L, index, 3);
var value3 = getor3(L, -1);
Lua.lua_settop(L, _lastTopIndex);
return(Tuple.Create(value1, value2, value3));
}