summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp22
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)";