diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-05-26 09:10:16 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-05-26 09:10:16 +0000 |
commit | b79d5028066e3debd4ab1715ab59f572df1b158a (patch) | |
tree | 565a2fd0d0085c89da7c9971f7af8e729f9f4fc6 /plugins/MirLua | |
parent | 1292231ff3df5048f7e2e1da1b5b41af1ad076d6 (diff) |
MirLua: m_schedule moved to separate module
git-svn-id: http://svn.miranda-ng.org/main/trunk@16871 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua')
-rw-r--r-- | plugins/MirLua/Modules/m_schedule/m_schedule.vcxproj | 28 | ||||
-rw-r--r-- | plugins/MirLua/Modules/m_schedule/src/main.cpp (renamed from plugins/MirLua/src/m_schedule.cpp) | 8 | ||||
-rw-r--r-- | plugins/MirLua/Modules/m_schedule/src/stdafx.cxx | 1 | ||||
-rw-r--r-- | plugins/MirLua/Modules/m_schedule/src/stdafx.h | 12 | ||||
-rw-r--r-- | plugins/MirLua/src/m_schedule.h | 9 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua_module_loader.cpp | 1 | ||||
-rw-r--r-- | plugins/MirLua/src/stdafx.h | 2 |
8 files changed, 46 insertions, 19 deletions
diff --git a/plugins/MirLua/Modules/m_schedule/m_schedule.vcxproj b/plugins/MirLua/Modules/m_schedule/m_schedule.vcxproj new file mode 100644 index 0000000000..b2b8563a1d --- /dev/null +++ b/plugins/MirLua/Modules/m_schedule/m_schedule.vcxproj @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>m_schedule</ProjectName>
+ <ProjectGuid>{FBB46BDD-FD4C-4F95-98E8-6F0B6E8067A9}</ProjectGuid>
+ </PropertyGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(ProjectDir)..\module.props" />
+ </ImportGroup>
+</Project>
diff --git a/plugins/MirLua/src/m_schedule.cpp b/plugins/MirLua/Modules/m_schedule/src/main.cpp index c501de84a9..61fa6a0a97 100644 --- a/plugins/MirLua/src/m_schedule.cpp +++ b/plugins/MirLua/Modules/m_schedule/src/main.cpp @@ -35,9 +35,9 @@ void ExecuteTaskThread(void *arg) ScheduleTask *task = (ScheduleTask*)arg;
lua_rawgeti(task->L, LUA_REGISTRYINDEX, task->callbackRef);
- luaM_pcall(task->L, 0, 1);
+ lua_pcall(task->L, 0, 1, 0);
- void* res = lua_touserdata(task->L, -1);
+ void *res = lua_touserdata(task->L, -1);
if (res == STOP || task->interval == 0)
{
@@ -605,7 +605,7 @@ static int schedule_Do(lua_State *L) lua_pushvalue(L, 1);
lua_pushcclosure(L, fluent_Do, 1);
lua_pushvalue(L, 2);
- luaM_pcall(L, 1);
+ lua_pcall(L, 1, 0, 0);
return 0;
}
@@ -623,7 +623,7 @@ static const luaL_Reg scheduleApi[] = /***********************************************/
-LUAMOD_API int luaopen_m_schedule(lua_State *L)
+extern "C" LUAMOD_API int luaopen_m_schedule(lua_State *L)
{
luaL_newlib(L, scheduleApi);
lua_pushlightuserdata(L, STOP);
diff --git a/plugins/MirLua/Modules/m_schedule/src/stdafx.cxx b/plugins/MirLua/Modules/m_schedule/src/stdafx.cxx new file mode 100644 index 0000000000..fd4f341c7b --- /dev/null +++ b/plugins/MirLua/Modules/m_schedule/src/stdafx.cxx @@ -0,0 +1 @@ +#include "stdafx.h" diff --git a/plugins/MirLua/Modules/m_schedule/src/stdafx.h b/plugins/MirLua/Modules/m_schedule/src/stdafx.h new file mode 100644 index 0000000000..bd775e51d4 --- /dev/null +++ b/plugins/MirLua/Modules/m_schedule/src/stdafx.h @@ -0,0 +1,12 @@ +#ifndef _COMMON_H_
+#define _COMMON_H_
+
+#include <windows.h>
+#include <time.h>
+
+#include <lua.hpp>
+
+#include <m_core.h>
+#include <m_utils.h>
+
+#endif //_COMMON_H_
\ No newline at end of file diff --git a/plugins/MirLua/src/m_schedule.h b/plugins/MirLua/src/m_schedule.h deleted file mode 100644 index 48874dd126..0000000000 --- a/plugins/MirLua/src/m_schedule.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _LUA_M_SCHEDULE_H_
-#define _LUA_M_SCHEDULE_H_
-
-#define MLUA_SCHEDULE "m_schedule"
-LUAMOD_API int (luaopen_m_schedule)(lua_State *L);
-
-void KillModuleScheduleTasks();
-
-#endif //_LUA_M_SCHEDULE_H_
\ No newline at end of file diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index afa7d7b04c..5f5c2080ce 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -87,8 +87,6 @@ void CMLua::Unload() delete script;
}
- KillModuleScheduleTasks();
-
KillModuleIcons(hMLuaLangpack);
KillModuleSounds(hMLuaLangpack);
KillModuleMenus(hMLuaLangpack);
@@ -123,4 +121,4 @@ void CMLua::KillLuaRefs() delete param;
}
}
-}
\ No newline at end of file +}
diff --git a/plugins/MirLua/src/mlua_module_loader.cpp b/plugins/MirLua/src/mlua_module_loader.cpp index e0777ac136..ad4141f0fa 100644 --- a/plugins/MirLua/src/mlua_module_loader.cpp +++ b/plugins/MirLua/src/mlua_module_loader.cpp @@ -35,7 +35,6 @@ void CMLuaModuleLoader::LoadModules() Preload(MLUA_HOTKEYS, luaopen_m_hotkeys);
Preload(MLUA_MESSAGE, luaopen_m_message);
Preload(MLUA_PROTOCOLS, luaopen_m_protocols);
- Preload(MLUA_SCHEDULE, luaopen_m_schedule);
Preload(MLUA_SOUNDS, luaopen_m_sounds);
}
diff --git a/plugins/MirLua/src/stdafx.h b/plugins/MirLua/src/stdafx.h index 0bd6712d48..d14e5bd116 100644 --- a/plugins/MirLua/src/stdafx.h +++ b/plugins/MirLua/src/stdafx.h @@ -91,8 +91,6 @@ LUAMOD_API int (luaopen_m_message)(lua_State *L); #include "m_protocols.h"
-#include "m_schedule.h"
-
#define MLUA_SOUNDS "m_sounds"
LUAMOD_API int (luaopen_m_sounds)(lua_State *L);
|