Skip to content

Commit

Permalink
Added void OpenLib
Browse files Browse the repository at this point in the history
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.
4 changes: 4 additions & 0 deletions include/selene/State.h
Expand Up @@ -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

Expand Down

0 comments on commit 32f92ec

Please sign in to comment.