summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CsUtil.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2007-09-24 17:20:15 +1000
committerMichi Henning <michi@zeroc.com>2007-09-24 17:25:53 +1000
commitbc0bc51721c9a7d863561418e1eb022eb2c80799 (patch)
treef7bd97af366e9c52b011676d588df218abc1b18b /cpp/src/Slice/CsUtil.cpp
parentIce.Admin.DelayCreation fixes (diff)
downloadice-bc0bc51721c9a7d863561418e1eb022eb2c80799.tar.bz2
ice-bc0bc51721c9a7d863561418e1eb022eb2c80799.tar.xz
ice-bc0bc51721c9a7d863561418e1eb022eb2c80799.zip
Fixed bug 2473 and
http://www.zeroc.com/forums/bug-reports/3395-c-nested-struct-unmarshalling-problem.html#post14910
Diffstat (limited to 'cpp/src/Slice/CsUtil.cpp')
-rwxr-xr-xcpp/src/Slice/CsUtil.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp
index 6db9f79c216..9a515839e42 100755
--- a/cpp/src/Slice/CsUtil.cpp
+++ b/cpp/src/Slice/CsUtil.cpp
@@ -130,6 +130,21 @@ Slice::CsGenerator::fixId(const string& name, int baseTypes, bool mangleCasts)
}
string
+Slice::CsGenerator::fixId(const ContainedPtr& cont, int baseTypes, bool mangleCasts)
+{
+ ContainerPtr container = cont->container();
+ ContainedPtr contained = ContainedPtr::dynamicCast(container);
+ if(contained && contained->hasMetaData("clr:property"))
+ {
+ return cont->name() + "_prop";
+ }
+ else
+ {
+ return fixId(cont->name(), baseTypes, mangleCasts);
+ }
+}
+
+string
Slice::CsGenerator::typeToString(const TypePtr& type)
{
if(!type)
@@ -519,7 +534,10 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out,
else
{
string typeS = typeToString(type);
- out << nl << param << " = new " << typeS << "();";
+ if(param.size() < 6 || param.substr(param.size() - 5) != "_prop")
+ {
+ out << nl << param << " = new " << typeS << "();";
+ }
if(streamingAPI)
{
out << nl << param << ".ice_read(" << stream << ");";