TOPKEK initializers.

This commit is contained in:
ThePhD 2016-05-11 22:09:17 -04:00
parent f1cedcb922
commit a4e3caee15
3 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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),

View File

@ -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: