summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/PythonUtil.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2010-05-15 20:00:27 -0700
committerMark Spruiell <mes@zeroc.com>2010-05-15 20:00:27 -0700
commit656503c0f5c305afe91f8d70e0e9b5e9d558b22d (patch)
tree6f37ea66dd2f28d8be5021a78b7a5c773b13975d /cpp/src/Slice/PythonUtil.cpp
parentbug 4749 - duplicate Slice files cause slice2java to fail (diff)
downloadice-656503c0f5c305afe91f8d70e0e9b5e9d558b22d.tar.bz2
ice-656503c0f5c305afe91f8d70e0e9b5e9d558b22d.tar.xz
ice-656503c0f5c305afe91f8d70e0e9b5e9d558b22d.zip
bug 4739 - fixing equals() method for structures
Diffstat (limited to 'cpp/src/Slice/PythonUtil.cpp')
-rwxr-xr-xcpp/src/Slice/PythonUtil.cpp9
1 files changed, 8 insertions, 1 deletions
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();