From 4b545aa6a214bccb73ebd610934f120d988ae60e Mon Sep 17 00:00:00 2001 From: ThePhD Date: Sun, 25 Oct 2015 07:17:48 -0400 Subject: [PATCH] Fix tuple returns (they don't need to be explicitly expanded in many cases). --- sol/function.hpp | 1 + sol/function_types.hpp | 4 ++-- sol/stack.hpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sol/function.hpp b/sol/function.hpp index bb6401d9..c3ba6378 100644 --- a/sol/function.hpp +++ b/sol/function.hpp @@ -79,6 +79,7 @@ public: o.index = 0; o.returncount = 0; o.error = call_error::runtime; + return *this; } bool valid() const { diff --git a/sol/function_types.hpp b/sol/function_types.hpp index 88215587..927efea9 100644 --- a/sol/function_types.hpp +++ b/sol/function_types.hpp @@ -351,11 +351,11 @@ struct functor_function : public base_function { } virtual int operator()(lua_State* L) override { - return (*this)(tuple_types(), args_type(), L); + return (*this)(types(), args_type(), L); } virtual int operator()(lua_State* L, detail::ref_call_t) override { - return (*this)(tuple_types(), args_type(), L); + return (*this)(types(), args_type(), L); } }; diff --git a/sol/stack.hpp b/sol/stack.hpp index 073d24bb..9356b507 100644 --- a/sol/stack.hpp +++ b/sol/stack.hpp @@ -575,7 +575,7 @@ inline void call(lua_State* L, int start, indices, types, types