Skip to content
Permalink
Browse files
Added void OpenLib
void OpenLib(const std::string& modname, lua_CFunction openf) allows the user of a sel::State to open an individual Lua library.
  • Loading branch information
dabbertorres committed Mar 6, 2014
1 parent 4d93749 commit 32f92ec
Showing 1 changed file with 4 additions and 0 deletions.
@@ -48,6 +48,10 @@ class State {
bool Load(const std::string &file) {
return !luaL_dofile(_l, file.c_str());
}

void OpenLib(const std::string& modname, lua_CFunction openf) {
luaL_requiref(_l, modname, openf, 1);
}

void Push() {} // Base case

0 comments on commit 32f92ec

Please sign in to comment.