125 #ifndef LUA_CPP_FUNCTION_HPP_INCLUDED
126 #define LUA_CPP_FUNCTION_HPP_INCLUDED
171 std::vector<lua_cpp::Reg>
l;
173 for(
int i = 0;
i < N;
i++) {
174 l.push_back(functions[
i]);
206 std::vector<lua_cpp::Reg>
l;
208 for(
int i = 0;
i < N;
i++) {
209 l.push_back(functions[
i]);
std::function< int(lua_State *)> lua_function
void push_function(lua_State *L, const lua_function &f)
Pushes a std::function wrapper object onto the stack.
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.
void register_metatable(lua_State *L)
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...