diff --git a/src/script/environment.h b/src/script/environment.h index b6d2fe0c..e3cb8865 100644 --- a/src/script/environment.h +++ b/src/script/environment.h @@ -1,5 +1,4 @@ -#ifndef SP_SCRIPT_ENVIRONMENT -#define SP_SCRIPT_ENVIRONMENT +#pragma once #include "stringImproved.h" #include "script/conversion.h" @@ -82,6 +81,8 @@ class Environment : NonCopyable } } + static lua_State* getL() { return L; } + private: template Result runImpl(const string& code, const string& name="=[string]") { int stack_size = lua_gettop(L); @@ -129,5 +130,3 @@ class Environment : NonCopyable }; } - -#endif//SP_SCRIPT_ENVIRONMENT