static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <XLua.OptimizeFlag>(L, 2)) { XLua.OptimizeFlag _flag; translator.Get(L, 2, out _flag); XLua.GCOptimizeAttribute gen_ret = new XLua.GCOptimizeAttribute(_flag); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 1) { XLua.GCOptimizeAttribute gen_ret = new XLua.GCOptimizeAttribute(); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to XLua.GCOptimizeAttribute constructor!")); }
static int _g_get_Flag(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); XLua.GCOptimizeAttribute gen_to_be_invoked = (XLua.GCOptimizeAttribute)translator.FastGetCSObj(L, 1); translator.PushXLuaOptimizeFlag(L, gen_to_be_invoked.Flag); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(1); }