From 4c73ded51e3d25b836fad3a8dfaf35ab1615a281 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 22 Feb 2016 22:29:21 +0000 Subject: MirLua: fixed metatable constructor function git-svn-id: http://svn.miranda-ng.org/main/trunk@16327 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua_metatable.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/MirLua/src/mlua_metatable.h') diff --git a/plugins/MirLua/src/mlua_metatable.h b/plugins/MirLua/src/mlua_metatable.h index 39bc63149c..5262b6f50c 100644 --- a/plugins/MirLua/src/mlua_metatable.h +++ b/plugins/MirLua/src/mlua_metatable.h @@ -68,7 +68,7 @@ private: *obj = NULL; } - static int lua__new(lua_State *L) + static int lua_new(lua_State *L) { T *udata = (T*)lua_newuserdata(L, sizeof(T)); memset(udata, 0, sizeof(T)); @@ -139,11 +139,9 @@ public: { MT::name = tname; - lua_register(L, MT::name, lua__new); + lua_register(L, MT::name, lua_new); luaL_newmetatable(L, MT::name); - lua_pushcfunction(L, lua__new); - lua_setfield(L, -2, "__call"); lua_pushcfunction(L, lua__index); lua_setfield(L, -2, "__index"); lua_pushcfunction(L, lua__gc); -- cgit v1.2.3