diff options
Diffstat (limited to 'cpp/src/Slice/PythonUtil.cpp')
-rw-r--r-- | cpp/src/Slice/PythonUtil.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index 307adc842ec..3471d0f7b6c 100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -833,6 +833,18 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) _out << ','; } _out << "))"; + + string deprecateMetadata; + if((*s)->findMetaData("deprecate", deprecateMetadata) || p->findMetaData("deprecate", deprecateMetadata)) + { + string msg; + string::size_type pos = deprecateMetadata.find(':'); + if(pos != string::npos && pos < deprecateMetadata.size() - 1) + { + msg = deprecateMetadata.substr(pos + 1); + } + _out << nl << name << "._op_" << (*s)->name() << ".deprecate(\"" << msg << "\")"; + } } } |