From 5c89906040b2ea1f307f3e337655a9429b858207 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 30 Jun 2015 21:37:39 +0000 Subject: MirLua: common code moved to m_core.h git-svn-id: http://svn.miranda-ng.org/main/trunk@14465 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_core.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 plugins/MirLua/src/m_core.h (limited to 'plugins/MirLua/src/m_core.h') diff --git a/plugins/MirLua/src/m_core.h b/plugins/MirLua/src/m_core.h new file mode 100644 index 0000000000..8313c3383d --- /dev/null +++ b/plugins/MirLua/src/m_core.h @@ -0,0 +1,26 @@ +#ifndef _LUA_M_CORE_H_ +#define _LUA_M_CORE_H_ + +#define MLUA_CORE "m" +LUAMOD_API int (luaopen_m)(lua_State *L); + +static LIST Hooks(1, PtrKeySortT); +static LIST Events(1, PtrKeySortT); +static LIST Services(1, PtrKeySortT); + +struct HandleRefParam +{ + HANDLE h; + int ref; + lua_State *L; + HandleRefParam(HANDLE h) : L(NULL), h(h), ref(0) { } + HandleRefParam(lua_State *L, HANDLE h, int ref = 0) : L(L), h(h), ref(ref) { } +}; + +static LIST HookRefs(1, HandleKeySortT); +static LIST ServiceRefs(1, HandleKeySortT); + +void KillModuleEventHooks(); +void KillModuleServices(); + +#endif //_LUA_M_CORE_H_ \ No newline at end of file -- cgit v1.2.3