diff options
author | aunsane <aunsane@gmail.com> | 2017-09-12 22:02:30 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-09-12 22:03:37 +0300 |
commit | 6f99f13cf590c323fd5bd5b4d6855e59f582fb0e (patch) | |
tree | 4b9a66758433be8273c7c20e06ab305901b4fdfb /plugins/MirLua/Modules/m_enumerable | |
parent | 6611ef6791a897d23cb79ab7b56eb48d49452b80 (diff) |
MirLua: massive refactoring
- m_msg_buttonbar moved to m_srrm
- version bump
Diffstat (limited to 'plugins/MirLua/Modules/m_enumerable')
-rw-r--r-- | plugins/MirLua/Modules/m_enumerable/src/main.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/MirLua/Modules/m_enumerable/src/main.cpp b/plugins/MirLua/Modules/m_enumerable/src/main.cpp index b905b18b62..8494c1385a 100644 --- a/plugins/MirLua/Modules/m_enumerable/src/main.cpp +++ b/plugins/MirLua/Modules/m_enumerable/src/main.cpp @@ -429,9 +429,6 @@ 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); @@ -439,5 +436,12 @@ extern "C" LUAMOD_API int luaopen_m_enumerable(lua_State *L) luaL_setfuncs(L, enumerableApi, 0); lua_pop(L, 1); + lua_createtable(L, 0, 1); + lua_pushcfunction(L, lua__new); + lua_setfield(L, -2, "new"); + lua_pushvalue(L, -1); + lua_setglobal(L, MT_ENUMERABLE); + lua_pop(L, 1); + return 1; } |