From 524c6efc4149e64c318fb8b5174816b5b7b7345c Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Wed, 19 Mar 2003 09:44:58 +0000 Subject: 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. --- cpp/src/slice2cpp/Gen.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'cpp/src/slice2cpp/Gen.cpp') 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 " @@ -2844,6 +2847,20 @@ Slice::Gen::HandleVisitor::visitClassDefStart(const ClassDefPtr& p) C << eb; 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)"; -- cgit v1.2.3