128 #include <functional>
160 void set_functions( lua_State* L,
const std::vector<lua_cpp::Reg>& functions);
171 std::vector<lua_cpp::Reg> l;
173 for(
int i = 0;
i < N;
i++) {
174 l.push_back(functions[
i]);
195 void set_functions( lua_State* L,
const std::vector<lua_cpp::Reg>& functions,
int nup);
206 std::vector<lua_cpp::Reg> l;
208 for(
int i = 0;
i < N;
i++) {
209 l.push_back(functions[
i]);
void register_metatable(lua_State *L)
void push_function(lua_State *L, const lua_function &f)
Pushes a std::function wrapper object onto the stack.
void set_functions(lua_State *L, const std::vector< lua_cpp::Reg > &functions)
Analogous to lua_setfuncs, it registers a collection of function wrapper objects into a table,...
std::function< int(lua_State *)> lua_function
void push_closure(lua_State *L, const lua_function &f, int nup)
Pushes a closure which retains a std::function object as its first up-value.