summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua_metatable.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/mlua_metatable.h')
-rw-r--r--plugins/MirLua/src/mlua_metatable.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/MirLua/src/mlua_metatable.h b/plugins/MirLua/src/mlua_metatable.h
index ec5ee58451..bef297905e 100644
--- a/plugins/MirLua/src/mlua_metatable.h
+++ b/plugins/MirLua/src/mlua_metatable.h
@@ -135,8 +135,7 @@ public:
{
MT::name = tname;
- lua_pushcfunction(L, lua__new);
- lua_setglobal(L, MT::name);
+ lua_register(L, MT::name, lua__new);
luaL_newmetatable(L, MT::name);
lua_pushcfunction(L, lua__new);