From df0444f85f9bf623cc886e1632e624ef20cb0f1b Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 23 Oct 2021 00:31:25 +0800 Subject: -member table --- Runtime/Lua/LuaBind/LuaBindEnum.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'Runtime/Lua/LuaBind/LuaBindEnum.cpp') diff --git a/Runtime/Lua/LuaBind/LuaBindEnum.cpp b/Runtime/Lua/LuaBind/LuaBindEnum.cpp index 63e2567..849fb8a 100644 --- a/Runtime/Lua/LuaBind/LuaBindEnum.cpp +++ b/Runtime/Lua/LuaBind/LuaBindEnum.cpp @@ -34,34 +34,4 @@ namespace LuaBind return luaL_error(L, "Enum called \"%s\" is readonly.", name); } - //--------------------------------------------------------------------------------// -#if LUA_BIND_ENABLE_PLAIN_ENUM - int PlainEnum::registry(lua_State* L) - { - // params: - // 1: enum name - // 2: metatable - - cc8* name = luaL_checkstring(L, 1); - - if (!lua_istable(L, 2)) - { - return luaL_error(L, "Create plain enum failed. Require table, but get %s", luaL_typename(L, 2)); - } - - lua_pushvalue(L, -1); - lua_setfield(L, -2, "__index"); - - lua_pushstring(L, name); - lua_pushcclosure(L, _rmt__newindex, 1); - lua_setfield(L, -2, "__newindex"); - - lua_newtable(L); // enum table - - lua_pushvalue(L, -2); // metatable - lua_setmetatable(L, -2); - - return 1; - } -#endif } \ No newline at end of file -- cgit v1.1-26-g67d0