mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Fix tuple returns (they don't need to be explicitly expanded in many cases).
This commit is contained in:
parent
e84cf66683
commit
4b545aa6a2
|
@ -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 {
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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 );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user