diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-01-02 23:03:00 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-01-02 23:03:00 +0000 |
commit | a5e4d2be50ad50f639b7aabc6de7c115c435830e (patch) | |
tree | 2f4c62674adced1f20792a9870656e4b2fedcefc /plugins/MirLua/src/mlua_utils.cpp | |
parent | bbd29a62e50b648ad5f40e997c094d02d8da5bc7 (diff) |
MirLua:
- fixed m_schedule
- massive function replace
git-svn-id: http://svn.miranda-ng.org/main/trunk@16004 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_utils.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua_utils.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/plugins/MirLua/src/mlua_utils.cpp b/plugins/MirLua/src/mlua_utils.cpp index db8544dbd7..9b5d9ca9ee 100644 --- a/plugins/MirLua/src/mlua_utils.cpp +++ b/plugins/MirLua/src/mlua_utils.cpp @@ -50,7 +50,7 @@ int luaM_print(lua_State *L) switch (lua_type(L, i))
{
case LUA_TNIL:
- data.AppendFormat("%s ", "nil");
+ data.Append("nil ");
break;
case LUA_TBOOLEAN:
data.AppendFormat("%s ", lua_toboolean(L, i) ? "true" : "false");
@@ -60,10 +60,10 @@ int luaM_print(lua_State *L) data.AppendFormat("%s ", lua_tostring(L, i));
break;
case LUA_TTABLE:
- data.AppendFormat("%s ", "table");
+ data.AppendFormat("table(0x%p) ", lua_topointer(L, i));
break;
default:
- data.AppendFormat("0x%p ", lua_topointer(L, i));
+ data.AppendFormat("%s(0x%p) ", luaL_typename(L, i), lua_topointer(L, i));
break;
}
}
@@ -149,12 +149,8 @@ int luaM_totable(lua_State *L) {
const char *tname = luaL_checkstring(L, 2);
- lua_getglobal(L, tname);
- if (lua_type(L, -1) == LUA_TNIL)
- {
- luaL_getmetatable(L, tname);
- lua_getfield(L, -1, "__init");
- }
+ luaL_getmetatable(L, tname);
+ lua_getfield(L, -1, "__call");
lua_pushvalue(L, 1);
luaM_pcall(L, 1, 1);
|