public static bool SetField(this IExpando exp, object key, BaseDynamic val) // caller to this func must restore the lua-stack's top after calling this func. { if (exp != null && key != null) { using (var ex = exp.Extra) { if (ex != null) { if (ex.ContainsKey(key)) { ex[key] = val; return(true); } } if (exp.Core != null) { if (exp.Core.SetFieldImp(key, val)) { return(true); } } if (ex != null) { ex[key] = val; return(true); } } } return(false); }
private static int LuaMetaRawEq(IntPtr l) { var o1 = l.GetLua(1); var o2 = l.GetLua(2); l.pushboolean(BaseDynamic.EitherEquals(o1, o2)); return(1); }