From e244a2bb67af5422c99d00089bb3a44be2dcec33 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Thu, 19 May 2016 17:31:57 -0400 Subject: [PATCH] SIGH g++ --- sol/state_view.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sol/state_view.hpp b/sol/state_view.hpp index 41646400..2eabd27b 100644 --- a/sol/state_view.hpp +++ b/sol/state_view.hpp @@ -175,13 +175,13 @@ public: stack::push(L, function_args>(std::forward(openfx))); lua_CFunction openf = stack::pop(L); luaL_requiref(L, key.c_str(), openf, is_global_library ? 1 : 0); - object r stack::pop(L); + object r = stack::pop(L); lua_pop(L, 1); return r; } object require_script(const std::string& key, const std::string& code) { - optional loaded = traverse_get>("package", "loaded", key); + optional loaded = global.traverse_get>("package", "loaded", key); bool ismod = loaded && !(loaded->is() && !loaded->as()); if (ismod) return std::move(*loaded); @@ -193,7 +193,7 @@ public: } object require_file(const std::string& key, const std::string& file) { - auto loaded = traverse_get>("package", "loaded", key); + auto loaded = global.traverse_get>("package", "loaded", key); bool ismod = loaded && !(loaded->is() && !loaded->as()); if (loaded) return std::move(*loaded);