Fix tuple returns (they don't need to be explicitly expanded in many cases).

This commit is contained in:
ThePhD 2015-10-25 07:17:48 -04:00
parent e84cf66683
commit 4b545aa6a2
3 changed files with 4 additions and 3 deletions

View File

@ -79,6 +79,7 @@ public:
o.index = 0; o.index = 0;
o.returncount = 0; o.returncount = 0;
o.error = call_error::runtime; o.error = call_error::runtime;
return *this;
} }
bool valid() const { bool valid() const {

View File

@ -351,11 +351,11 @@ struct functor_function : public base_function {
} }
virtual int operator()(lua_State* L) override { virtual int operator()(lua_State* L) override {
return (*this)(tuple_types<return_type>(), args_type(), L); return (*this)(types<return_type>(), args_type(), L);
} }
virtual int operator()(lua_State* L, detail::ref_call_t) override { virtual int operator()(lua_State* L, detail::ref_call_t) override {
return (*this)(tuple_types<return_type>(), args_type(), L); return (*this)(types<return_type>(), args_type(), L);
} }
}; };

View File

@ -575,7 +575,7 @@ inline void call(lua_State* L, int start, indices<I...>, types<void>, types<Args
} }
} // detail } // detail
void remove( lua_State* L, int index, int count ) { inline void remove( lua_State* L, int index, int count ) {
if ( count < 1 ) if ( count < 1 )
return; return;
int top = lua_gettop( L ); int top = lua_gettop( L );