Exemplo n.º 1
0
		FunctionResults LuaVariantImpl<Derived>::operator()(Args&&... args)
		{
			int t = type();
			if (t == LUA_TTHREAD)
			{
				return this->template resume<FunctionResults>(std::forward<Args>(args)...);
			}
			else if (t == LUA_TFUNCTION)
			{
				return this->template call<FunctionResults>(std::forward<Args>(args)...);
			}
			else
			{
				except::typeMismatchError(state_(), " is not function or thread");
				return FunctionResults(state_());
			}
		}
Exemplo n.º 2
0
		inline RetType FunctionResultProxy::ReturnValue(lua_State* state, int return_status, int retindex, types::typetag<RetType> tag)
		{
			return FunctionResults(state, return_status, retindex).get_result(types::typetag<RetType>());
		}
Exemplo n.º 3
0
		inline FunctionResults FunctionResultProxy::ReturnValue(lua_State* state, int return_status, int retindex, types::typetag<FunctionResults> tag)
		{
			return FunctionResults(state, return_status, retindex);
		}
Exemplo n.º 4
0
	inline void FunctionResultProxy::ReturnValue(lua_State* state, int retindex, types::typetag<void> tag)
	{
		FunctionResults(state, retindex);
	}