diff options
author | Michi Henning <michi@zeroc.com> | 2007-11-09 17:14:25 +1000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2007-11-09 17:14:25 +1000 |
commit | 62e3bae5d0a186ba7919a2e186c52de8d3ca0988 (patch) | |
tree | de652c46c42b9a56a676b50d4c983fadef421390 /cpp/src/Slice/CsUtil.cpp | |
parent | Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff) | |
download | ice-62e3bae5d0a186ba7919a2e186c52de8d3ca0988.tar.bz2 ice-62e3bae5d0a186ba7919a2e186c52de8d3ca0988.tar.xz ice-62e3bae5d0a186ba7919a2e186c52de8d3ca0988.zip |
Work-around for bug 2532 until gmcs is fixed.
Fixed makefile that was broken with the tree reorganziation.
Fixed makedepend.py which was broken by that too.
Ran make depend to update the .depend files.
Diffstat (limited to 'cpp/src/Slice/CsUtil.cpp')
-rwxr-xr-x | cpp/src/Slice/CsUtil.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp index ae9ed24bc11..c5ef9a41d29 100755 --- a/cpp/src/Slice/CsUtil.cpp +++ b/cpp/src/Slice/CsUtil.cpp @@ -26,6 +26,16 @@ using namespace std; using namespace Slice; using namespace IceUtil; +// +// 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) { @@ -198,7 +208,7 @@ Slice::CsGenerator::typeToString(const TypePtr& type) } else { - return "global::" + type + "<" + typeToString(seq->type()) + ">"; + return global() + type + "<" + typeToString(seq->type()) + ">"; } } @@ -763,7 +773,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else if(isCustom) { - out << "global::" << genericType << "<Ice.Object>();"; + out << global() << genericType << "<Ice.Object>();"; } else if(isGeneric) { @@ -878,7 +888,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__)"; @@ -959,7 +969,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else if(isCustom) { - out << "global::" << genericType << "<" << typeS << ">()"; + out << global() << genericType << "<" << typeS << ">()"; } else if(isGeneric) { @@ -1097,7 +1107,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else if(isCustom) { - out << "global::" << genericType << "<" << typeS << ">();"; + out << global() << genericType << "<" << typeS << ">();"; } else if(isGeneric) { @@ -1234,7 +1244,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else if(isCustom) { - out << "global::" << genericType << "<" << typeS << ">();"; + out << global() << genericType << "<" << typeS << ">();"; } else if(isGeneric) { @@ -1349,7 +1359,7 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else if(isCustom) { - out << "global::" << genericType << "<" << typeS << ">();"; + out << global() << genericType << "<" << typeS << ">();"; } else if(isGeneric) { |