diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-12-07 11:13:56 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-12-07 11:13:56 +0100 |
commit | 658ac73336cf61454bda551e9438b9a17bfc24b3 (patch) | |
tree | c094be8fc92bc8cd77c0fed00acda4f15873ec05 /cpp/src/slice2cpp/Gen.cpp | |
parent | 4424 - .NET FxCop Globalization Rules (diff) | |
download | ice-658ac73336cf61454bda551e9438b9a17bfc24b3.tar.bz2 ice-658ac73336cf61454bda551e9438b9a17bfc24b3.tar.xz ice-658ac73336cf61454bda551e9438b9a17bfc24b3.zip |
Fixed bug 4225 -- servant dispatch needs to lock/unlock the global GC mutex
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 6822f587487..3533a2a790b 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -3822,6 +3822,14 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) } } } + + bool hasBaseClass = !bases.empty() && !bases.front()->isInterface(); + bool override = p->canBeCyclic() && (!hasBaseClass || !bases.front()->canBeCyclic()); + if(override) + { + H << ", private IceInternal::GCShared"; + } + H.restoreIndent(); H << sb; H.dec(); @@ -4827,20 +4835,6 @@ Slice::Gen::ObjectVisitor::emitGCFunctions(const ClassDefPtr& p) if(override) { - H << nl << "virtual void __incRef();"; - - C << sp << nl << "void" << nl << scoped.substr(2) << "::__incRef()"; - C << sb; - C << nl << "__gcIncRef();"; - C << eb; - - H << nl << "virtual void __decRef();"; - - C << sp << nl << "void" << nl << scoped.substr(2) << "::__decRef()"; - C << sb; - C << nl << "__gcDecRef();"; - C << eb; - H << nl << "virtual void __addObject(::IceInternal::GCCountMap&);"; C << sp << nl << "void" << nl << scoped.substr(2) << "::__addObject(::IceInternal::GCCountMap& _c)"; |