summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CsUtil.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2009-03-25 15:04:04 +1000
committerMichi Henning <michi@zeroc.com>2009-03-25 15:04:04 +1000
commit514f19bfec2a1b18977b4704bc5814fe7ab7d04a (patch)
treef82bf6479418f851de0608a268be349d3736e7e5 /cpp/src/Slice/CsUtil.cpp
parentFixed proguard command (diff)
downloadice-514f19bfec2a1b18977b4704bc5814fe7ab7d04a.tar.bz2
ice-514f19bfec2a1b18977b4704bc5814fe7ab7d04a.tar.xz
ice-514f19bfec2a1b18977b4704bc5814fe7ab7d04a.zip
Bug 2523: Mono does not support global:: prefix
Diffstat (limited to 'cpp/src/Slice/CsUtil.cpp')
-rw-r--r--cpp/src/Slice/CsUtil.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp
index 2f656872638..7edd7d8e569 100644
--- a/cpp/src/Slice/CsUtil.cpp
+++ b/cpp/src/Slice/CsUtil.cpp
@@ -28,16 +28,6 @@ using namespace Slice;
using namespace IceUtil;
using namespace IceUtilInternal;
-//
-// TODO: Temporary work-around for Mono compiler bug: "global::" does not work for generic classes.
-//
-
-static string
-global()
-{
- return "\n#if !__MonoCS__ \nglobal::\n#endif\n";
-}
-
static string
lookupKwd(const string& name, int baseTypes, bool mangleCasts = false)
{
@@ -210,7 +200,7 @@ Slice::CsGenerator::typeToString(const TypePtr& type)
}
else
{
- return global() + type + "<" + typeToString(seq->type()) + ">";
+ return "global::" + type + "<" + typeToString(seq->type()) + ">";
}
}
@@ -218,7 +208,7 @@ Slice::CsGenerator::typeToString(const TypePtr& type)
if(seq->findMetaData(prefix, meta))
{
string type = meta.substr(prefix.size());
- return global() + type;
+ return "global::" + type;
}
return typeToString(seq->type()) + "[]";
@@ -806,7 +796,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
}
else if(isCustom)
{
- out << global() << genericType << "<Ice.Object>();";
+ out << "global::" << genericType << "<Ice.Object>();";
}
else if(isGeneric)
{
@@ -936,7 +926,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
else if(isCustom)
{
out << sb;
- out << nl << param << " = new " << global() << genericType << "<"
+ out << nl << param << " = new " << "global::" << genericType << "<"
<< typeToString(type) << ">();";
out << nl << "int szx__ = " << stream << ".readSize();";
out << nl << "for(int ix__ = 0; ix__ < szx__; ++ix__)";
@@ -1017,7 +1007,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
}
else if(isCustom)
{
- out << global() << genericType << "<" << typeS << ">()";
+ out << "global::" << genericType << "<" << typeS << ">()";
}
else if(isGeneric)
{
@@ -1183,7 +1173,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
}
else if(isCustom)
{
- out << global() << genericType << "<" << typeS << ">();";
+ out << "global::" << genericType << "<" << typeS << ">();";
}
else if(isGeneric)
{
@@ -1335,7 +1325,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
}
else if(isCustom)
{
- out << global() << genericType << "<" << typeS << ">();";
+ out << "global::" << genericType << "<" << typeS << ">();";
}
else if(isGeneric)
{
@@ -1460,7 +1450,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
}
else if(isCustom)
{
- out << global() << genericType << "<" << typeS << ">();";
+ out << "global::" << genericType << "<" << typeS << ">();";
}
else if(isGeneric)
{