From 485691562a75595eda00af35f5235f6fc22fa36c Mon Sep 17 00:00:00 2001 From: Mark Spruiell Date: Thu, 10 May 2012 16:45:22 -0700 Subject: C++ bug fixes; adding more Python tests --- cpp/src/Slice/PythonUtil.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cpp/src/Slice/PythonUtil.cpp') diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index fada4154502..4e363c17d18 100755 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -796,8 +796,8 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) DataMemberList members = p->dataMembers(); _out << sp << nl << "_M_" << type << " = IcePy.defineClass('" << scoped << "', " << name << ", "; writeMetaData(p->getMetaData()); - _out << ", " << (isAbstract ? "True" : "False") << ", " << (p->hasMetaData("preserve-slice") ? "True" : "False") - << ", "; + const bool preserved = p->hasMetaData("preserve-slice") || p->inheritsMetaData("preserve-slice"); + _out << ", " << (isAbstract ? "True" : "False") << ", " << (preserved ? "True" : "False") << ", "; if(!base) { _out << "None"; @@ -1106,7 +1106,8 @@ Slice::Python::CodeVisitor::visitExceptionStart(const ExceptionPtr& p) string type = getAbsolute(p, "_t_"); _out << sp << nl << "_M_" << type << " = IcePy.defineException('" << scoped << "', " << name << ", "; writeMetaData(p->getMetaData()); - _out << ", " << (p->hasMetaData("preserve-slice") ? "True" : "False") << ", "; + const bool preserved = p->hasMetaData("preserve-slice") || p->inheritsMetaData("preserve-slice"); + _out << ", " << (preserved ? "True" : "False") << ", "; if(!base) { _out << "None"; -- cgit v1.2.3