diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-01-14 18:32:22 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-01-14 18:32:22 +0000 |
commit | 55ca0ecfa502004ebb473cb5997d9985c0547d33 (patch) | |
tree | 86cf5291362feb739840fa290c60d4f2b659d531 /plugins/MirLua/src/m_core.cpp | |
parent | 8faf41f61815681cb27b824967f42f0b848c9549 (diff) |
MirLua:
- added Version in m_core
- reworked m_schedule, pt.2
git-svn-id: http://svn.miranda-ng.org/main/trunk@16090 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/m_core.cpp')
-rw-r--r-- | plugins/MirLua/src/m_core.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/MirLua/src/m_core.cpp b/plugins/MirLua/src/m_core.cpp index 1c39729333..d75f0435a0 100644 --- a/plugins/MirLua/src/m_core.cpp +++ b/plugins/MirLua/src/m_core.cpp @@ -283,6 +283,8 @@ luaL_Reg coreApi[] = { "GetFullPath", core_GetFullPath },
+ { "Version", NULL },
+
{ "NULL", NULL },
{ "INVALID_HANDLE_VALUE", NULL },
{ "CALLSERVICE_NOTFOUND", NULL },
@@ -299,6 +301,12 @@ LUAMOD_API int luaopen_m_core(lua_State *L) lua_setfield(L, -2, "INVALID_HANDLE_VALUE");
lua_pushinteger(L, CALLSERVICE_NOTFOUND);
lua_setfield(L, -2, "CALLSERVICE_NOTFOUND");
+
+ char version[128];
+ CallService(MS_SYSTEM_GETVERSIONTEXT, (WPARAM)_countof(version), (LPARAM)version);
+ lua_pushstring(L, ptrA(mir_utf8encode(version)));
+ lua_setfield(L, -2, "Version");
+
// set copy to global variable m
lua_pushvalue(L, -1);
lua_setglobal(L, "m");
|