summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-01-11 22:23:57 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-01-11 22:24:06 +0300
commitd958e3fb847813075cc059bd5a7aa28252982268 (patch)
treed9c02a7ddee830628248219e9c83c7de3c335140 /plugins/MirLua/src
parentc8e1c429321ed8aa2efce0fc00b6dfd08f1b2735 (diff)
strong typization - better typization
Diffstat (limited to 'plugins/MirLua/src')
-rw-r--r--plugins/MirLua/src/main.cpp7
-rw-r--r--plugins/MirLua/src/mlua_utils.cpp4
-rw-r--r--plugins/MirLua/src/stdafx.h2
3 files changed, 6 insertions, 7 deletions
diff --git a/plugins/MirLua/src/main.cpp b/plugins/MirLua/src/main.cpp
index ce2d3aa589..0539404a7d 100644
--- a/plugins/MirLua/src/main.cpp
+++ b/plugins/MirLua/src/main.cpp
@@ -9,7 +9,7 @@ CMLua *g_mLua;
HANDLE g_hCLibsFolder;
HANDLE g_hScriptsFolder;
-HANDLE hNetlib = NULL;
+HNETLIBUSER hNetlib = NULL;
PLUGININFOEX pluginInfo =
{
@@ -60,12 +60,11 @@ extern "C" int __declspec(dllexport) Load(void)
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- NETLIBUSER nlu = { 0 };
- nlu.cbSize = sizeof(nlu);
+ NETLIBUSER nlu = {};
nlu.flags = NUF_NOOPTIONS;
nlu.szDescriptiveName = MODULE;
nlu.szSettingsModule = MODULE;
- hNetlib = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
+ hNetlib = Netlib_RegisterUser(&nlu);
PROTOCOLDESCRIPTOR pd = { 0 };
pd.cbSize = sizeof(pd);
diff --git a/plugins/MirLua/src/mlua_utils.cpp b/plugins/MirLua/src/mlua_utils.cpp
index 7323755ea5..5c84fb5c74 100644
--- a/plugins/MirLua/src/mlua_utils.cpp
+++ b/plugins/MirLua/src/mlua_utils.cpp
@@ -4,7 +4,7 @@ void Log(const char *format, ...)
{
va_list args;
va_start(args, format);
- CallService(MS_NETLIB_LOG, (WPARAM)hNetlib, (LPARAM)(CMStringA().FormatV(format, args)));
+ Netlib_Log(hNetlib, CMStringA().FormatV(format, args));
va_end(args);
}
@@ -12,7 +12,7 @@ void Log(const wchar_t *format, ...)
{
va_list args;
va_start(args, format);
- CallService(MS_NETLIB_LOGW, (WPARAM)hNetlib, (LPARAM)(CMStringW().FormatV(format, args)));
+ Netlib_LogW(hNetlib, CMStringW().FormatV(format, args));
va_end(args);
}
diff --git a/plugins/MirLua/src/stdafx.h b/plugins/MirLua/src/stdafx.h
index 645e30c906..dda365dd82 100644
--- a/plugins/MirLua/src/stdafx.h
+++ b/plugins/MirLua/src/stdafx.h
@@ -98,7 +98,7 @@ LUAMOD_API int (luaopen_m_sounds)(lua_State *L);
/* utils */
-extern HANDLE hNetlib;
+extern HNETLIBUSER hNetlib;
void Log(const char *format, ...);
void Log(const wchar_t *format, ...);