mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
TOPKEK initializers.
This commit is contained in:
parent
f1cedcb922
commit
a4e3caee15
|
@ -175,10 +175,14 @@ struct fail_on_error : base_function {
|
||||||
virtual int operator()(lua_State* L) override {
|
virtual int operator()(lua_State* L) override {
|
||||||
return prelude(L);
|
return prelude(L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~fail_on_error() {
|
||||||
|
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
inline fail_on_error& failure_on_error() {
|
inline fail_on_error& failure_on_error() {
|
||||||
static fail_on_error f;
|
static fail_on_error f{};
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
} // function_detail
|
} // function_detail
|
||||||
|
|
|
@ -50,8 +50,8 @@ private:
|
||||||
table reg;
|
table reg;
|
||||||
global_table global;
|
global_table global;
|
||||||
public:
|
public:
|
||||||
typedef typename global_table::iterator iterator;
|
typedef global_table::iterator iterator;
|
||||||
typedef typename global_table::const_iterator const_iterator;
|
typedef global_table::const_iterator const_iterator;
|
||||||
|
|
||||||
state_view(lua_State* L):
|
state_view(lua_State* L):
|
||||||
L(L),
|
L(L),
|
||||||
|
|
|
@ -375,6 +375,7 @@ private:
|
||||||
newindexfunc = functions.back().get();
|
newindexfunc = functions.back().get();
|
||||||
break;
|
break;
|
||||||
case meta_function::construct:
|
case meta_function::construct:
|
||||||
|
constructfuncname = name.c_str();
|
||||||
constructfunc = function_detail::usertype_call<N>;
|
constructfunc = function_detail::usertype_call<N>;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user