diff options
author | Michi Henning <michi@zeroc.com> | 2004-10-13 05:46:26 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2004-10-13 05:46:26 +0000 |
commit | 367a869587e95faa0f0d8daf94302b1e78f055ee (patch) | |
tree | 1266f0b247d8f5322a8fb3ec0547bfbaa7fdba84 /cpp/src/slice2java/Gen.cpp | |
parent | Made it illegal for non-local interfaces/classes to be derived from (diff) | |
download | ice-367a869587e95faa0f0d8daf94302b1e78f055ee.tar.bz2 ice-367a869587e95faa0f0d8daf94302b1e78f055ee.tar.xz ice-367a869587e95faa0f0d8daf94302b1e78f055ee.zip |
Fixed bug in slice2java: with the --impl-tie option, incorrect code was
generated for local interfaces and classes.
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 4f416edb444..16777338943 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -1236,6 +1236,22 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p) out << nl << "return _ice_delegate.hashCode();"; out << eb; + if(p->isLocal()) + { + out << sp << nl << "public int" << nl << "ice_hash()"; + out << sb; + out << nl << "return hashCode();"; + out << eb; + + out << sp << nl << "public java.lang.Object" << nl << "clone()"; + out.inc(); + out << nl << "throws java.lang.CloneNotSupportedException"; + out.dec(); + out << sb; + out << nl << "return super.clone();"; + out << eb; + } + OperationList ops = p->allOperations(); OperationList::const_iterator r; for(r = ops.begin(); r != ops.end(); ++r) |