summaryrefslogtreecommitdiff
path: root/plugins/MirLua/Modules
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2017-09-02 22:38:22 +0300
committeraunsane <aunsane@gmail.com>2017-09-02 22:38:22 +0300
commit8ee803c41a67156d6a9e6286e79ea5bdaa2ec292 (patch)
treecde4b355e39808c1052644f58b0f74601752d488 /plugins/MirLua/Modules
parentbc4da963e5ebc651d1d7839a4da39ba59dfa4ea0 (diff)
MirLua: m_enumerable: added constructor function
Diffstat (limited to 'plugins/MirLua/Modules')
-rw-r--r--plugins/MirLua/Modules/m_enumerable/src/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/MirLua/Modules/m_enumerable/src/main.cpp b/plugins/MirLua/Modules/m_enumerable/src/main.cpp
index 709377f589..b905b18b62 100644
--- a/plugins/MirLua/Modules/m_enumerable/src/main.cpp
+++ b/plugins/MirLua/Modules/m_enumerable/src/main.cpp
@@ -429,6 +429,9 @@ extern "C" LUAMOD_API int luaopen_m_enumerable(lua_State *L)
{
luaL_newlib(L, methods);
+ lua_pushcfunction(L, lua__new);
+ lua_setglobal(L, MT_ENUMERABLE);
+
luaL_newmetatable(L, MT_ENUMERABLE);
luaL_setfuncs(L, enumerableMeta, 0);
lua_pushvalue(L, -1);