diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-06-15 15:57:54 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-06-15 15:57:54 +0000 |
commit | 037aeccee0e9986784ad07bef4ad4ebc8a30d58d (patch) | |
tree | 10f21a0c12056dde36e6851f292d015b03d2858d /plugins/MirLua/src/mlua_script.cpp | |
parent | d7c8421febc417a767fe74afa3a4a22c9bc55b70 (diff) |
MirLua: added m_options module
git-svn-id: http://svn.miranda-ng.org/main/trunk@16978 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_script.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua_script.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/MirLua/src/mlua_script.cpp b/plugins/MirLua/src/mlua_script.cpp index 5f43d7fbda..9676f36192 100644 --- a/plugins/MirLua/src/mlua_script.cpp +++ b/plugins/MirLua/src/mlua_script.cpp @@ -26,7 +26,7 @@ CMLuaScript::~CMLuaScript() mir_free(moduleName);
}
-bool CMLuaScript::GetScriptEnviroment(lua_State *L)
+bool CMLuaScript::GetEnviroment(lua_State *L)
{
lua_Debug ar;
if (lua_getstack(L, 1, &ar) == 0 || lua_getinfo(L, "f", &ar) == 0 || lua_iscfunction(L, -1))
@@ -47,7 +47,7 @@ bool CMLuaScript::GetScriptEnviroment(lua_State *L) CMLuaScript* CMLuaScript::GetScriptFromEnviroment(lua_State *L)
{
- if (!GetScriptEnviroment(L))
+ if (!GetEnviroment(L))
return NULL;
lua_getfield(L, -1, SCRIPT);
@@ -61,11 +61,16 @@ int CMLuaScript::GetScriptIdFromEnviroment(lua_State *L) {
CMLuaScript *script = GetScriptFromEnviroment(L);
if (script != NULL)
- return script->id;
+ return script->GetId();
return hMLuaLangpack;
}
+int CMLuaScript::GetId() const
+{
+ return id;
+}
+
const char* CMLuaScript::GetModuleName() const
{
return moduleName;
|