From 656503c0f5c305afe91f8d70e0e9b5e9d558b22d Mon Sep 17 00:00:00 2001 From: Mark Spruiell Date: Sat, 15 May 2010 20:00:27 -0700 Subject: bug 4739 - fixing equals() method for structures --- cpp/src/Slice/PythonUtil.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cpp/src/Slice/PythonUtil.cpp') diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index 8a9d96da270..08c30f4d2df 100755 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -1244,7 +1244,14 @@ Slice::Python::CodeVisitor::visitStructStart(const StructPtr& p) _out.dec(); _out << nl << "elif other == None:"; _out.inc(); - _out << nl << "return False"; + if(opName == "__ne__") + { + _out << nl << "return True"; + } + else + { + _out << nl << "return False"; + } _out.dec(); _out << nl << "return NotImplemented"; _out.dec(); -- cgit v1.2.3