summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceBox/Admin.cpp2
-rw-r--r--cpp/src/IcePatch2/Client.cpp2
-rw-r--r--cpp/src/IceStorm/Admin.cpp2
-rw-r--r--cpp/src/IceStorm/IceStormDB.cpp2
-rw-r--r--cpp/src/Slice/PythonUtil.cpp20
-rw-r--r--cpp/src/Slice/RubyUtil.cpp30
-rw-r--r--cpp/src/icegriddb/IceGridDB.cpp2
-rw-r--r--cpp/src/slice2php/Main.cpp4
8 files changed, 44 insertions, 20 deletions
diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp
index 7d02add95c4..a7fa43141ce 100644
--- a/cpp/src/IceBox/Admin.cpp
+++ b/cpp/src/IceBox/Admin.cpp
@@ -17,7 +17,7 @@ using namespace std;
using namespace Ice;
using namespace IceInternal;
-class Client : public Application
+class Client : public Ice::Application
{
public:
diff --git a/cpp/src/IcePatch2/Client.cpp b/cpp/src/IcePatch2/Client.cpp
index 93217371140..294708b3348 100644
--- a/cpp/src/IcePatch2/Client.cpp
+++ b/cpp/src/IcePatch2/Client.cpp
@@ -255,7 +255,7 @@ private:
bool _pressAnyKeyMessage;
};
-class Client : public Application
+class Client : public Ice::Application
{
public:
diff --git a/cpp/src/IceStorm/Admin.cpp b/cpp/src/IceStorm/Admin.cpp
index be27118c284..bbbeace543a 100644
--- a/cpp/src/IceStorm/Admin.cpp
+++ b/cpp/src/IceStorm/Admin.cpp
@@ -23,7 +23,7 @@ using namespace Ice;
using namespace IceInternal;
using namespace IceStorm;
-class Client : public Application
+class Client : public Ice::Application
{
public:
diff --git a/cpp/src/IceStorm/IceStormDB.cpp b/cpp/src/IceStorm/IceStormDB.cpp
index 96c7aa70d20..dbf23aaf62c 100644
--- a/cpp/src/IceStorm/IceStormDB.cpp
+++ b/cpp/src/IceStorm/IceStormDB.cpp
@@ -22,7 +22,7 @@ using namespace IceInternal;
using namespace IceStorm;
using namespace IceStormElection;
-class Client : public Application
+class Client : public Ice::Application
{
public:
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index 0553a520791..18428211e97 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -705,14 +705,15 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
{
_out << ", " << inParams;
}
- _out << ", _ctx=None):";
+ const string contextParamName = getEscapedParamName(*oli, "context");
+ _out << ", " << contextParamName << "=None):";
_out.inc();
_out << nl << "return _M_" << abs << "._op_" << (*oli)->name() << ".invoke(self, ((" << inParams;
if(!inParams.empty() && inParams.find(',') == string::npos)
{
_out << ", ";
}
- _out << "), _ctx))";
+ _out << "), " << contextParamName << "))";
_out.dec();
//
@@ -725,14 +726,14 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
{
_out << ", " << inParams;
}
- _out << ", _ctx=None):";
+ _out << ", " << contextParamName << "=None):";
_out.inc();
_out << nl << "return _M_" << abs << "._op_" << (*oli)->name() << ".invokeAsync(self, ((" << inParams;
if(!inParams.empty() && inParams.find(',') == string::npos)
{
_out << ", ";
}
- _out << "), _ctx))";
+ _out << "), " << contextParamName << "))";
_out.dec();
_out << sp;
@@ -742,14 +743,14 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
{
_out << ", " << inParams;
}
- _out << ", _response=None, _ex=None, _sent=None, _ctx=None):";
+ _out << ", _response=None, _ex=None, _sent=None, " << contextParamName << "=None):";
_out.inc();
_out << nl << "return _M_" << abs << "._op_" << (*oli)->name() << ".begin(self, ((" << inParams;
if(!inParams.empty() && inParams.find(',') == string::npos)
{
_out << ", ";
}
- _out << "), _response, _ex, _sent, _ctx))";
+ _out << "), _response, _ex, _sent, " << contextParamName << "))";
_out.dec();
_out << sp;
@@ -760,9 +761,9 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
_out.dec();
}
- _out << sp << nl << "def checkedCast(proxy, facetOrCtx=None, _ctx=None):";
+ _out << sp << nl << "def checkedCast(proxy, facetOrContext=None, context=None):";
_out.inc();
- _out << nl << "return _M_" << prxAbs << ".ice_checkedCast(proxy, '" << scoped << "', facetOrCtx, _ctx)";
+ _out << nl << "return _M_" << prxAbs << ".ice_checkedCast(proxy, '" << scoped << "', facetOrContext, context)";
_out.dec();
_out << nl << "checkedCast = staticmethod(checkedCast)";
@@ -2596,7 +2597,8 @@ Slice::Python::CodeVisitor::writeDocstring(const OperationPtr& op, DocstringMode
}
if(!local && (mode == DocSync || mode == DocAsync || mode == DocAsyncBegin))
{
- _out << nl << "_ctx -- The request context for the invocation.";
+ const string contextParamName = getEscapedParamName(op, "context");
+ _out << nl << contextParamName << " -- The request context for the invocation.";
}
if(!local && (mode == DocDispatch || mode == DocAsyncDispatch))
{
diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp
index b5d62fc0aee..afe0ce289d2 100644
--- a/cpp/src/Slice/RubyUtil.cpp
+++ b/cpp/src/Slice/RubyUtil.cpp
@@ -19,6 +19,27 @@ using namespace Slice;
using namespace IceUtil;
using namespace IceUtilInternal;
+
+namespace
+{
+
+string
+getEscapedParamName(const OperationPtr& p, const string& name)
+{
+ ParamDeclList params = p->parameters();
+
+ for(ParamDeclList::const_iterator i = params.begin(); i != params.end(); ++i)
+ {
+ if((*i)->name() == name)
+ {
+ return name + "_";
+ }
+ }
+ return name;
+}
+
+}
+
namespace Slice
{
namespace Ruby
@@ -524,10 +545,11 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
{
_out << inParams << ", ";
}
- _out << "_ctx=nil)";
+ const string contextParamName = getEscapedParamName(*oli, "context");
+ _out << contextParamName << "=nil)";
_out.inc();
_out << nl << name << "_mixin::OP_" << (*oli)->name() << ".invoke(self, [" << inParams;
- _out << "], _ctx)";
+ _out << "], " << contextParamName << ")";
_out.dec();
_out << nl << "end";
}
@@ -538,9 +560,9 @@ Slice::Ruby::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
_out.inc();
_out << nl << "include " << name << "Prx_mixin";
- _out << sp << nl << "def " << name << "Prx.checkedCast(proxy, facetOrCtx=nil, _ctx=nil)";
+ _out << sp << nl << "def " << name << "Prx.checkedCast(proxy, facetOrContext=nil, context=nil)";
_out.inc();
- _out << nl << "ice_checkedCast(proxy, '" << scoped << "', facetOrCtx, _ctx)";
+ _out << nl << "ice_checkedCast(proxy, '" << scoped << "', facetOrContext, context)";
_out.dec();
_out << nl << "end";
diff --git a/cpp/src/icegriddb/IceGridDB.cpp b/cpp/src/icegriddb/IceGridDB.cpp
index 8fdabee0f5b..4ad7def73d2 100644
--- a/cpp/src/icegriddb/IceGridDB.cpp
+++ b/cpp/src/icegriddb/IceGridDB.cpp
@@ -126,7 +126,7 @@ struct StreamReader<IceGrid::ReplicaGroupDescriptor, Ice::InputStream>
}
-class Client : public Application
+class Client : public Ice::Application
{
public:
diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp
index 1c2cd419296..312091ecde1 100644
--- a/cpp/src/slice2php/Main.cpp
+++ b/cpp/src/slice2php/Main.cpp
@@ -399,9 +399,9 @@ CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << sp << nl << "class " << prxName << "Helper";
_out << sb;
- _out << sp << nl << "public static function checkedCast($proxy, $facetOrCtx=null, $ctx=null)";
+ _out << sp << nl << "public static function checkedCast($proxy, $facetOrContext=null, $context=null)";
_out << sb;
- _out << nl << "return $proxy->ice_checkedCast('" << scoped << "', $facetOrCtx, $ctx);";
+ _out << nl << "return $proxy->ice_checkedCast('" << scoped << "', $facetOrContext, $context);";
_out << eb;
_out << sp << nl << "public static function uncheckedCast($proxy, $facet=null)";