diff options
Diffstat (limited to 'cpp/src')
-rwxr-xr-x | cpp/src/slice2cs/Gen.cpp | 12 | ||||
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 14 |
2 files changed, 20 insertions, 6 deletions
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index 341d2d52489..93b926534e1 100755 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -3501,12 +3501,20 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << sp; _out << nl << "public void " << opName << "_async" << spar << paramsAMI << epar; _out << sb; - _out << nl << "cb__.invoke__" << spar << "this" << argsAMI << "null" << epar << ';'; + _out << nl << opName << "_async" << spar << argsAMI << "null" << "false" << epar << ';'; _out << eb; + _out << sp; _out << nl << "public void " << opName << "_async" << spar << paramsAMI << "Ice.Context ctx__" << epar; _out << sb; - _out << nl << "if(ctx__ == null)"; + _out << nl << opName << "_async" << spar << argsAMI << "ctx__" << "true" << epar << ';'; + _out << eb; + + _out << sp; + _out << nl << "public void " << opName << "_async" << spar << paramsAMI << "Ice.Context ctx__" + << "bool explicitContext__" << epar; + _out << sb; + _out << nl << "if(explicitContext__ && ctx__ == null)"; _out << sb; _out << nl << "ctx__ = emptyContext_;"; _out << eb; diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 6227aee3b95..fb07de4ca1c 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -3406,7 +3406,13 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) out << sp; out << nl << "public void" << nl << op->name() << "_async" << spar << paramsAMI << epar; out << sb; - out << nl << "__cb.__invoke" << spar << "this" << argsAMI << "null" << epar << ';'; + out << nl << opName << "_async" << spar << argsAMI << "null" << "false" << epar << ';'; + out << eb; + + out << sp; + out << nl << "public void" << nl << op->name() << "_async" << spar << paramsAMI << contextParam << epar; + out << sb; + out << nl << opName << "_async" << spar << argsAMI << "__ctx" << "true" << epar << ';'; out << eb; out << sp; @@ -3421,10 +3427,10 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) { out << nl << "@SuppressWarnings(\"unchecked\")"; } - out << nl << "public void" << nl << op->name() << "_async" << spar << paramsAMI - << contextParam << epar; + out << nl << "private void" << nl << opName << "_async" << spar << paramsAMI + << contextParam << explicitContextParam << epar; out << sb; - out << nl << "if( __ctx == null)"; + out << nl << "if(__explicitCtx && __ctx == null)"; out << sb; out << nl << "__ctx = _emptyContext;"; out << eb; |