diff options
author | Bernard Normier <bernard@zeroc.com> | 2014-06-12 11:42:18 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2014-06-12 11:42:18 -0400 |
commit | 715c69e14fd00bede2dccc8930cfe1898ca36390 (patch) | |
tree | 7ab497780b40c1122a35b56bace6b3e06fa3584a /cpp/src/slice2cpp/Gen.cpp | |
parent | Fixed VS2010 compilation error in GC code (diff) | |
download | ice-715c69e14fd00bede2dccc8930cfe1898ca36390.tar.bz2 ice-715c69e14fd00bede2dccc8930cfe1898ca36390.tar.xz ice-715c69e14fd00bede2dccc8930cfe1898ca36390.zip |
Fix for ICE-5542: add message to ICE_DEPRECATED_API in C++
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index c26c89ac518..1f8c2846bd3 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -36,7 +36,12 @@ getDeprecateSymbol(const ContainedPtr& p1, const ContainedPtr& p2) if(p1->findMetaData("deprecate", deprecateMetadata) || (p2 != 0 && p2->findMetaData("deprecate", deprecateMetadata))) { - deprecateSymbol = "ICE_DEPRECATED_API "; + string msg = "is deprecated"; + if(deprecateMetadata.find("deprecate:") == 0 && deprecateMetadata.size() > 10) + { + msg = deprecateMetadata.substr(10); + } + deprecateSymbol = "ICE_DEPRECATED_API(\"" + msg + "\") "; } return deprecateSymbol; } |