diff options
author | Michi Henning <michi@zeroc.com> | 2003-03-19 09:44:58 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2003-03-19 09:44:58 +0000 |
commit | 524c6efc4149e64c318fb8b5174816b5b7b7345c (patch) | |
tree | 03df71df54b0bd214af78f73ee565a5217933226 /cpp/src/slice2cpp/Gen.cpp | |
parent | deep comparison of sequences (diff) | |
download | ice-524c6efc4149e64c318fb8b5174816b5b7b7345c.tar.bz2 ice-524c6efc4149e64c318fb8b5174816b5b7b7345c.tar.xz ice-524c6efc4149e64c318fb8b5174816b5b7b7345c.zip |
The following Slice file generated incorrect code:
class X; class Y { X myX; };
Fixed the marshaling side (__write() and __marshal()) for this, but the
reading side (__read() and __unmarshal()) are still broken.
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 6d7fc1b9cec..e478ca79e59 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -2803,6 +2803,9 @@ Slice::Gen::HandleVisitor::visitClassDecl(const ClassDeclPtr& p) H << sp; H << nl << _dllExport << "void __write(::IceInternal::BasicStream*, const " << name << "Prx&);"; H << nl << _dllExport << "void __read(::IceInternal::BasicStream*, " << name << "Prx&);"; + H << nl << _dllExport << "void __write(::IceInternal::BasicStream*, const " << name << "Ptr&);"; + H << nl << _dllExport << "void __writeObject(const ::Ice::StreamPtr&, const ::std::string&, const " + << name << "Ptr&);"; H << sp; H << nl << _dllExport << "void ice_marshal(const ::std::string&, const ::Ice::StreamPtr&, const " @@ -2845,6 +2848,20 @@ Slice::Gen::HandleVisitor::visitClassDefStart(const ClassDefPtr& p) C << eb; C << sp; + C << nl << "void" << nl << scope.substr(2) << "__write(::IceInternal::BasicStream* __os, const " << scoped + << "Ptr& v)"; + C << sb; + C << nl << "__os->write(::Ice::ObjectPtr(v));"; + C << eb; + + C << sp; + C << nl << "void" << nl << scope.substr(2) << "__writeObject(const ::Ice::StreamPtr& __os, " + << "const ::std::string& __s, const " << scoped << "Ptr& v)"; + C << sb; + C << nl << "__os->writeObject(__s, ::Ice::ObjectPtr(v));"; + C << eb; + + C << sp; C << nl << "void" << nl << scope.substr(2) << "ice_marshal(const ::std::string& __name, const ::Ice::StreamPtr& __os, const " << scoped << "Prx& v)"; C << sb; |