diff options
Diffstat (limited to 'Sluift/main.cpp')
-rw-r--r-- | Sluift/main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Sluift/main.cpp b/Sluift/main.cpp index e2fa9c8..76ba572 100644 --- a/Sluift/main.cpp +++ b/Sluift/main.cpp @@ -15,4 +15,5 @@ #include <boost/version.hpp> #include <boost/numeric/conversion/cast.hpp> +#include <boost/assign/list_of.hpp> #include <Sluift/Console.h> #include <Sluift/StandardTerminal.h> @@ -152,6 +153,11 @@ int main(int argc, char* argv[]) { // Import some useful functions into the global namespace lua_getglobal(L, "sluift"); - lua_getfield(L, -1, "help"); - lua_setglobal(L, "help"); + std::vector<std::string> globalImports = boost::assign::list_of + ("help")("with"); + foreach (const std::string& globalImport, globalImports) { + lua_getfield(L, -1, globalImport.c_str()); + lua_setglobal(L, globalImport.c_str()); + } + lua_pop(L, 1); std::cout << SLUIFT_WELCOME_STRING << std::endl; |