diff options
author | Mark Spruiell <mes@zeroc.com> | 2011-05-06 09:23:05 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2011-05-06 09:23:05 -0700 |
commit | cacc6ce6ad910f0b9cf313961de13dc874363977 (patch) | |
tree | 7d74d0eb61ecb18ee2c34a3cc672adfe7389ca2d /cpp/src/slice2cpp/Gen.cpp | |
parent | fixing URL in RELEASE_NOTES (diff) | |
download | ice-cacc6ce6ad910f0b9cf313961de13dc874363977.tar.bz2 ice-cacc6ce6ad910f0b9cf313961de13dc874363977.tar.xz ice-cacc6ce6ad910f0b9cf313961de13dc874363977.zip |
bug 4857 - incorrect linkage for types with default values
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index dda60d533d5..9150549bcd5 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -1048,7 +1048,8 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p) string name = fixKwd(p->name()); - if(findMetaData(p->getMetaData()) == "class") + bool classMetaData = findMetaData(p->getMetaData()) == "class"; + if(classMetaData) { H << sp << nl << "class " << _dllExport << name << " : public IceUtil::Shared"; H << sb; @@ -1078,7 +1079,7 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p) H << sb; if(p->hasDefaultValues()) { - H << nl << name << "();"; + H << nl << _dllExport << name << "();"; C << sp << nl << fixKwd(p->scoped()).substr(2) << "::" << fixKwd(p->name()) << "() :"; C.inc(); @@ -1106,6 +1107,10 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p) } H << nl; + if(!classMetaData) + { + H << _dllExport; + } if(paramDecls.size() == 1) { H << "explicit "; |