mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
bad fallthrough, missed specialization
This commit is contained in:
parent
0192fcb176
commit
3ad438ac01
|
@ -313,14 +313,16 @@ namespace sol {
|
|||
template <typename... Functions>
|
||||
struct pusher<overload_set<Functions...>> {
|
||||
static int push(lua_State* L, overload_set<Functions...>&& set) {
|
||||
// TODO: yielding
|
||||
typedef function_detail::overloaded_function<0, Functions...> F;
|
||||
pusher<function_sig<>>{}.set_fx<F>(L, std::move(set.functions));
|
||||
pusher<function_sig<>>{}.set_fx<false, F>(L, std::move(set.functions));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int push(lua_State* L, const overload_set<Functions...>& set) {
|
||||
// TODO: yielding
|
||||
typedef function_detail::overloaded_function<0, Functions...> F;
|
||||
pusher<function_sig<>>{}.set_fx<F>(L, set.functions);
|
||||
pusher<function_sig<>>{}.set_fx<false, F>(L, set.functions);
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -104,10 +104,13 @@ namespace function_detail {
|
|||
switch (lua_gettop(L)) {
|
||||
case 0:
|
||||
nr = call_detail::call_wrapped<T, true, false, -1>(L, var, mem);
|
||||
break;
|
||||
case 1:
|
||||
nr = call_detail::call_wrapped<T, false, false, -1>(L, var, mem);
|
||||
break;
|
||||
default:
|
||||
nr = luaL_error(L, "sol: incorrect number of arguments to member variable function");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (is_yielding) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user