diff options
author | Bernard Normier <bernard@zeroc.com> | 2014-06-26 20:54:48 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2014-06-26 20:54:48 +0000 |
commit | 005998b0fe3bcc3fb4e4a850b49164c4e19eb441 (patch) | |
tree | f221c20c1065ec13c81d7b5aa8d7bf056aef1e65 /cpp/src | |
parent | Fixed ICE-5546: Python Ice/converter demo (diff) | |
download | ice-005998b0fe3bcc3fb4e4a850b49164c4e19eb441.tar.bz2 ice-005998b0fe3bcc3fb4e4a850b49164c4e19eb441.tar.xz ice-005998b0fe3bcc3fb4e4a850b49164c4e19eb441.zip |
Fix for ICE-5515 (ice_staticId on proxies) in Java, C#, Python, Ruby and PHP (not complete in Python, Ruby and PHP)
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Slice/PythonUtil.cpp | 10 | ||||
-rw-r--r-- | cpp/src/Slice/RubyUtil.cpp | 6 | ||||
-rw-r--r-- | cpp/src/slice2php/Main.cpp | 5 |
3 files changed, 21 insertions, 0 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index 59f4e98ab51..bfdf33a7b8d 100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -779,7 +779,17 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) _out.dec(); _out << nl << "uncheckedCast = staticmethod(uncheckedCast)"; + + // + // ice_staticId + // + _out << sp << nl << "def ice_staticId():"; + _out.inc(); + _out << nl << "return '" << scoped << "'"; _out.dec(); + _out << nl << "ice_staticId = staticmethod(ice_staticId)"; + + _out.dec(); _out << sp << nl << "_M_" << prxType << " = IcePy.defineProxy('" << scoped << "', " << prxName << ")"; } diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp index a93af8ec9fd..79a8185d2f4 100644 --- a/cpp/src/Slice/RubyUtil.cpp +++ b/cpp/src/Slice/RubyUtil.cpp @@ -581,6 +581,12 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) _out.dec(); _out << nl << "end"; + _out << nl << "def " << name << "Prx.ice_staticId()"; + _out.inc(); + _out << nl << "'" << scoped << "'"; + _out.dec(); + _out << nl << "end"; + _out.dec(); _out << nl << "end"; // End of proxy class. } diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp index 0abc9a3f25a..5cd4afc6a5c 100644 --- a/cpp/src/slice2php/Main.cpp +++ b/cpp/src/slice2php/Main.cpp @@ -373,6 +373,11 @@ CodeVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "return $proxy->ice_uncheckedCast('" << scoped << "', $facet);"; _out << eb; + _out << sp << nl << "public static function ice_staticId()"; + _out << sb; + _out << nl << "return '" << scoped << "';"; + _out << eb; + _out << eb; } |