From 6a6a1d097e043dba142d5cdc485e6b4dbe67e12a Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 7 Jan 2016 10:42:38 +0000 Subject: MirLua: - added script cache on load - refactoring git-svn-id: http://svn.miranda-ng.org/main/trunk@16044 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua_script.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'plugins/MirLua/src/mlua_script.h') diff --git a/plugins/MirLua/src/mlua_script.h b/plugins/MirLua/src/mlua_script.h index 38e207549d..76731395fb 100644 --- a/plugins/MirLua/src/mlua_script.h +++ b/plugins/MirLua/src/mlua_script.h @@ -3,24 +3,33 @@ class CMLuaScript { +public: + enum Status + { + None, + Loaded, + Failed + }; + private: lua_State *L; - char* moduleName; - TCHAR* fileName; + char *moduleName; + TCHAR *fileName; TCHAR filePath[MAX_PATH]; - bool isLoaded; + Status status; int unloadRef; public: - CMLuaScript(lua_State *L, const TCHAR* path); + CMLuaScript(lua_State *L, const TCHAR *path); ~CMLuaScript(); const char* GetModuleName() const; const TCHAR* GetFilePath() const; const TCHAR* GetFileName() const; - const int GetGroup() const; + + const Status GetStatus() const; bool Load(); void Unload(); -- cgit v1.2.3