public override bool Equals(object o) { if (o is LuaBase) { LuaBase luaBase = (LuaBase)o; return(this._Interpreter.compareRef(luaBase._Reference, this._Reference)); } return(false); }
public override bool Equals(object o) { if (o is LuaBase) { LuaBase l = (LuaBase)o; return(Interpreter.compareRef(l.Reference, Reference)); } else { return(false); } }
/// <summary>Full Lua equality which can be controlled with metatables.</summary> public bool LuaEquals(LuaBase o) { if (o == null || o.Owner != Owner) { return(false); } var L = Owner._L; luanet.checkstack(L, 2, "LuaBase.LuaEquals"); rawpush(L); o.rawpush(L); try { return(lua.equal(L, -1, -2)); } finally { lua.pop(L, 2); } }
/// <summary>Raw equality. (For table field lookups, Lua uses raw comparisons internally.)</summary> public bool Equals(LuaBase o) { if (o == null || o.Owner != Owner) { return(false); } var L = Owner._L; luanet.checkstack(L, 2, "LuaBase.Equals"); rawpush(L); o.rawpush(L); bool ret = lua.rawequal(L, -1, -2); lua.pop(L, 2); return(ret); }
/// <summary>Full Lua equality which can be controlled with metatables.</summary> public bool LuaEquals(LuaBase o) { if (o == null || o.Owner != Owner) { return(false); } var L = Owner._L; luaclr.checkstack(L, 2, "LuaBase.LuaEquals"); rawpush(L); o.rawpush(L); int oldTop = -3; try { return(lua.equal(L, -1, -2)); } catch (LuaInternalException) { oldTop = -1; throw; } finally { lua.settop(L, oldTop); } }
public static int GetReference(LuaBase luaObject) { Object reference = luaObject.GetType().InvokeMember( "_Reference", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, null, luaObject, null ); return (int)reference; }