diff options
Diffstat (limited to 'cpp/src/slice2java/Gen.cpp')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
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; |