summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/PythonUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice/PythonUtil.cpp')
-rw-r--r--cpp/src/Slice/PythonUtil.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index 18428211e97..e1001869e8a 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -569,11 +569,11 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
//
// ice_staticId
//
- _out << sp << nl << "def ice_staticId():";
+ _out << sp << nl << "@staticmethod";
+ _out << nl << "def ice_staticId():";
_out.inc();
_out << nl << "return '" << scoped << "'";
_out.dec();
- _out << nl << "ice_staticId = staticmethod(ice_staticId)";
}
if(!ops.empty())
@@ -761,27 +761,27 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
_out.dec();
}
- _out << sp << nl << "def checkedCast(proxy, facetOrContext=None, context=None):";
+ _out << sp << nl << "@staticmethod";
+ _out << nl << "def checkedCast(proxy, facetOrContext=None, context=None):";
_out.inc();
_out << nl << "return _M_" << prxAbs << ".ice_checkedCast(proxy, '" << scoped << "', facetOrContext, context)";
_out.dec();
- _out << nl << "checkedCast = staticmethod(checkedCast)";
- _out << sp << nl << "def uncheckedCast(proxy, facet=None):";
+ _out << sp << nl << "@staticmethod";
+ _out << nl << "def uncheckedCast(proxy, facet=None):";
_out.inc();
_out << nl << "return _M_" << prxAbs << ".ice_uncheckedCast(proxy, facet)";
_out.dec();
- _out << nl << "uncheckedCast = staticmethod(uncheckedCast)";
//
// ice_staticId
//
- _out << sp << nl << "def ice_staticId():";
+ _out << sp << nl << "@staticmethod";
+ _out << nl << "def ice_staticId():";
_out.inc();
_out << nl << "return '" << scoped << "'";
_out.dec();
- _out << nl << "ice_staticId = staticmethod(ice_staticId)";
_out.dec();