From 55b1f7fafef7085638c4c8604b248bbe9fe08124 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 17 Apr 2016 15:43:34 +0000 Subject: MirLua: - added function topointer into _G - overrided tonumber to support pointers - api methods is only support light userdata as wparam/lparam git-svn-id: http://svn.miranda-ng.org/main/trunk@16697 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins/MirLua/src/mlua.cpp') diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index fea62b2d93..f2cdafb41b 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -50,6 +50,11 @@ void CMLua::Load() lua_register(L, "print", luaM_print); lua_register(L, "a", luaM_toansi); lua_register(L, "u", luaM_toucs2); + lua_register(L, "topointer", luaM_topointer); + + lua_getglobal(L, "tonumber"); + lua_setglobal(L, "_tonumber"); + lua_register(L, "tonumber", luaM_tonumber); lua_atpanic(L, luaM_atpanic); -- cgit v1.2.3