You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2009/03/24 21:01:04 UTC

svn commit: r757989 - in /incubator/thrift/trunk/compiler/cpp/src: generate/ parse/

Author: dreiss
Date: Tue Mar 24 20:01:02 2009
New Revision: 757989

URL: http://svn.apache.org/viewvc?rev=757989&view=rev
Log:
THRIFT-136. s/async/oneway/ in compiler variables

This is an internal-only change.

Modified:
    incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc
    incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc
    incubator/thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc
    incubator/thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc
    incubator/thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc
    incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc
    incubator/thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc
    incubator/thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc
    incubator/thrift/trunk/compiler/cpp/src/generate/t_php_generator.cc
    incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc
    incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc
    incubator/thrift/trunk/compiler/cpp/src/generate/t_st_generator.cc
    incubator/thrift/trunk/compiler/cpp/src/parse/t_function.h

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc Tue Mar 24 20:01:02 2009
@@ -969,7 +969,7 @@
  * @param tfunction The function
  */
 void t_cocoa_generator::generate_function_helpers(t_function* tfunction) {
-  if (tfunction->is_async()) {
+  if (tfunction->is_oneway()) {
     return;
   }
 
@@ -1137,7 +1137,7 @@
     scope_down(out);
     out << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       t_struct noargs(program_);
       t_function recv_function((*f_iter)->get_returntype(),
                                string("recv_") + (*f_iter)->get_name(),
@@ -1220,7 +1220,7 @@
     }
     out << "];" << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       out << indent();
       if (!(*f_iter)->get_returntype()->is_void()) {
         out << "return ";

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc Tue Mar 24 20:01:02 2009
@@ -1590,7 +1590,7 @@
                              (*f_iter)->get_arglist());
     indent(f_header_) << function_signature(*f_iter) << ";" << endl;
     indent(f_header_) << function_signature(&send_function) << ";" << endl;
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       t_struct noargs(program_);
       t_function recv_function((*f_iter)->get_returntype(),
                                string("recv_") + (*f_iter)->get_name(),
@@ -1646,7 +1646,7 @@
     }
     f_service_ << ");" << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       f_service_ << indent();
       if (!(*f_iter)->get_returntype()->is_void()) {
         if (is_complex_type((*f_iter)->get_returntype())) {
@@ -1699,7 +1699,7 @@
     f_service_ << endl;
 
     // Generate recv function only if not an async function
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       t_struct noargs(program_);
       t_function recv_function((*f_iter)->get_returntype(),
                                string("recv_") + (*f_iter)->get_name(),
@@ -1965,7 +1965,7 @@
  */
 void t_cpp_generator::generate_function_helpers(t_service* tservice,
                                                 t_function* tfunction) {
-  if (tfunction->is_async()) {
+  if (tfunction->is_oneway()) {
     return;
   }
 
@@ -2021,7 +2021,7 @@
   vector<t_field*>::const_iterator x_iter;
 
   // Declare result
-  if (!tfunction->is_async()) {
+  if (!tfunction->is_oneway()) {
     f_service_ <<
       indent() << resultname << " result;" << endl;
   }
@@ -2038,7 +2038,7 @@
 
   bool first = true;
   f_service_ << indent();
-  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void()) {
+  if (!tfunction->is_oneway() && !tfunction->get_returntype()->is_void()) {
     if (is_complex_type(tfunction->get_returntype())) {
       first = false;
       f_service_ << "iface_->" << tfunction->get_name() << "(result.success";
@@ -2060,7 +2060,7 @@
   f_service_ << ");" << endl;
 
   // Set isset on success field
-  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void()) {
+  if (!tfunction->is_oneway() && !tfunction->get_returntype()->is_void()) {
     f_service_ <<
       indent() << "result.__isset.success = true;" << endl;
   }
@@ -2068,10 +2068,10 @@
   indent_down();
   f_service_ << indent() << "}";
 
-  if (!tfunction->is_async()) {
+  if (!tfunction->is_oneway()) {
     for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
       f_service_ << " catch (" << type_name((*x_iter)->get_type()) << " &" << (*x_iter)->get_name() << ") {" << endl;
-      if (!tfunction->is_async()) {
+      if (!tfunction->is_oneway()) {
         indent_up();
         f_service_ <<
           indent() << "result." << (*x_iter)->get_name() << " = " << (*x_iter)->get_name() << ";" << endl <<
@@ -2086,7 +2086,7 @@
 
   f_service_ << " catch (const std::exception& e) {" << endl;
 
-  if (!tfunction->is_async()) {
+  if (!tfunction->is_oneway()) {
     indent_up();
     f_service_ <<
       indent() << "apache::thrift::TApplicationException x(e.what());" << endl <<
@@ -2101,7 +2101,7 @@
   f_service_ << indent() << "}" << endl;
 
   // Shortcut out here for async functions
-  if (tfunction->is_async()) {
+  if (tfunction->is_oneway()) {
     f_service_ <<
       indent() << "return;" << endl;
     indent_down();

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_csharp_generator.cc Tue Mar 24 20:01:02 2009
@@ -859,7 +859,7 @@
     }
     f_service_ << ");" << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       f_service_ << indent();
       if (!(*f_iter)->get_returntype()->is_void()) {
         f_service_ << "return ";
@@ -897,7 +897,7 @@
     scope_down(f_service_);
     f_service_ << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       string resultname = (*f_iter)->get_name() + "_result";
 
       t_struct noargs(program_);
@@ -1066,7 +1066,7 @@
 }
 
 void t_csharp_generator::generate_function_helpers(t_function* tfunction) {
-  if (tfunction->is_async()) {
+  if (tfunction->is_oneway()) {
     return;
   }
 
@@ -1103,7 +1103,7 @@
   const std::vector<t_field*>& xceptions = xs->get_members();
   vector<t_field*>::const_iterator x_iter;
 
-  if (!tfunction->is_async()) {
+  if (!tfunction->is_oneway()) {
     f_service_ <<
       indent() << resultname << " result = new " << resultname << "();" << endl;
   }
@@ -1119,7 +1119,7 @@
   vector<t_field*>::const_iterator f_iter;
 
   f_service_ << indent();
-  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void()) {
+  if (!tfunction->is_oneway() && !tfunction->get_returntype()->is_void()) {
     f_service_ << "result.Success = ";
   }
   f_service_ <<
@@ -1135,12 +1135,12 @@
   }
   f_service_ << ");" << endl;
 
-  if (!tfunction->is_async() && xceptions.size() > 0) {
+  if (!tfunction->is_oneway() && xceptions.size() > 0) {
     indent_down();
     f_service_ << indent() << "}";
     for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
       f_service_ << " catch (" << type_name((*x_iter)->get_type(), false, false) << " " << (*x_iter)->get_name() << ") {" << endl;
-      if (!tfunction->is_async()) {
+      if (!tfunction->is_oneway()) {
         indent_up();
         f_service_ <<
           indent() << "result." << prop_name(*x_iter) << " = " << (*x_iter)->get_name() << ";" << endl;
@@ -1153,7 +1153,7 @@
     f_service_ << endl;
   }
 
-  if (tfunction->is_async()) {
+  if (tfunction->is_oneway()) {
     f_service_ <<
       indent() << "return;" << endl;
     scope_down(f_service_);

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_erl_generator.cc Tue Mar 24 20:01:02 2009
@@ -675,7 +675,7 @@
   if (!tfunction->get_returntype()->is_void())
     indent(f_service_) <<
         generate_type_term(tfunction->get_returntype(), false) << ";" << endl;
-  else if (tfunction->is_async())
+  else if (tfunction->is_oneway())
     indent(f_service_) << "async_void;" << endl;
   else
     indent(f_service_) << "{struct, []}" << ";" << endl;

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_hs_generator.cc Tue Mar 24 20:01:02 2009
@@ -766,7 +766,7 @@
 
     f_client_ << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       f_client_ << indent();
       f_client_ <<
         "recv_" << funname << " ip" << endl;
@@ -801,7 +801,7 @@
 
     indent_down();
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       std::string resultname = capitalize((*f_iter)->get_name() + "_result");
       t_struct noargs(program_);
 
@@ -958,7 +958,7 @@
   const std::vector<t_field*>& xceptions = xs->get_members();
   vector<t_field*>::const_iterator x_iter;
   int n = xceptions.size();
-  if (!tfunction->is_async()){
+  if (!tfunction->is_oneway()){
     if(!tfunction->get_returntype()->is_void()){
       n++;
     }
@@ -983,7 +983,7 @@
   f_service_ << "(do" << endl;
   indent_up();
   f_service_ << indent();
-  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void()){
+  if (!tfunction->is_oneway() && !tfunction->get_returntype()->is_void()){
     f_service_ << "res <- ";
   }
   f_service_ << "Iface." << tfunction->get_name() << " handler";
@@ -992,21 +992,21 @@
   }
 
 
-  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void()){
+  if (!tfunction->is_oneway() && !tfunction->get_returntype()->is_void()){
     f_service_ << endl;
     indent(f_service_) << "return rs{f_"<<resultname<<"_success= Just res}";
-  } else if (!tfunction->is_async()){
+  } else if (!tfunction->is_oneway()){
     f_service_ << endl;
     indent(f_service_) << "return rs";
   }
   f_service_ << ")" << endl;
   indent_down();
 
-  if (xceptions.size() > 0 && !tfunction->is_async()) {
+  if (xceptions.size() > 0 && !tfunction->is_oneway()) {
     for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
       indent(f_service_) << "(\\e  -> " <<endl;
       indent_up();
-      if(!tfunction->is_async()){
+      if(!tfunction->is_oneway()){
         f_service_ <<
           indent() << "return rs{f_"<<resultname<<"_" << (*x_iter)->get_name() << " =Just e}";
       } else {
@@ -1021,7 +1021,7 @@
 
 
   // Shortcut out here for async functions
-  if (tfunction->is_async()) {
+  if (tfunction->is_oneway()) {
     f_service_ <<
       indent() << "return ()" << endl;
     indent_down();

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc Tue Mar 24 20:01:02 2009
@@ -1807,7 +1807,7 @@
     }
     f_service_ << ");" << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       f_service_ << indent();
       if (!(*f_iter)->get_returntype()->is_void()) {
         f_service_ << "return ";
@@ -1847,7 +1847,7 @@
     scope_down(f_service_);
     f_service_ << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       string resultname = (*f_iter)->get_name() + "_result";
 
       t_struct noargs(program_);
@@ -2017,7 +2017,7 @@
  * @param tfunction The function
  */
 void t_java_generator::generate_function_helpers(t_function* tfunction) {
-  if (tfunction->is_async()) {
+  if (tfunction->is_oneway()) {
     return;
   }
 
@@ -2067,7 +2067,7 @@
   vector<t_field*>::const_iterator x_iter;
 
   // Declare result for non async function
-  if (!tfunction->is_async()) {
+  if (!tfunction->is_oneway()) {
     f_service_ <<
       indent() << resultname << " result = new " << resultname << "();" << endl;
   }
@@ -2085,7 +2085,7 @@
   vector<t_field*>::const_iterator f_iter;
 
   f_service_ << indent();
-  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void()) {
+  if (!tfunction->is_oneway() && !tfunction->get_returntype()->is_void()) {
     f_service_ << "result.success = ";
   }
   f_service_ <<
@@ -2102,17 +2102,17 @@
   f_service_ << ");" << endl;
 
   // Set isset on success field
-  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void() && !type_can_be_null(tfunction->get_returntype())) {
+  if (!tfunction->is_oneway() && !tfunction->get_returntype()->is_void() && !type_can_be_null(tfunction->get_returntype())) {
     f_service_ <<
       indent() << "result.__isset.success = true;" << endl;
   }
 
-  if (!tfunction->is_async() && xceptions.size() > 0) {
+  if (!tfunction->is_oneway() && xceptions.size() > 0) {
     indent_down();
     f_service_ << indent() << "}";
     for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
       f_service_ << " catch (" << type_name((*x_iter)->get_type(), false, false) << " " << (*x_iter)->get_name() << ") {" << endl;
-      if (!tfunction->is_async()) {
+      if (!tfunction->is_oneway()) {
         indent_up();
         f_service_ <<
           indent() << "result." << (*x_iter)->get_name() << " = " << (*x_iter)->get_name() << ";" << endl;
@@ -2126,7 +2126,7 @@
   }
 
   // Shortcut out here for async functions
-  if (tfunction->is_async()) {
+  if (tfunction->is_oneway()) {
     f_service_ <<
       indent() << "return;" << endl;
     scope_down(f_service_);

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_ocaml_generator.cc Tue Mar 24 20:01:02 2009
@@ -861,7 +861,7 @@
     }
     f_service_ << ";" << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       f_service_ << indent();
       f_service_ <<
         "self#recv_" << funname << endl;
@@ -896,7 +896,7 @@
     indent_down();
     indent_down();
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       std::string resultname = decapitalize((*f_iter)->get_name() + "_result");
       t_struct noargs(program_);
 
@@ -1097,7 +1097,7 @@
   vector<t_field*>::const_iterator x_iter;
 
   // Declare result for non async function
-  if (!tfunction->is_async()) {
+  if (!tfunction->is_oneway()) {
     f_service_ <<
       indent() << "let result = new " << resultname << " in" << endl;
     indent_up();
@@ -1114,7 +1114,7 @@
 
 
   f_service_ << indent();
-  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void()) {
+  if (!tfunction->is_oneway() && !tfunction->get_returntype()->is_void()) {
     f_service_ << "result#set_success ";
   }
   f_service_ <<
@@ -1134,7 +1134,7 @@
         indent() << "| " << capitalize(type_name((*x_iter)->get_type())) << " " << (*x_iter)->get_name() << " -> " << endl;
       indent_up();
       indent_up();
-      if(!tfunction->is_async()){
+      if(!tfunction->is_oneway()){
            f_service_ <<
              indent() << "result#set_" << (*x_iter)->get_name() << " " << (*x_iter)->get_name() << endl;
       } else {
@@ -1150,7 +1150,7 @@
 
 
   // Shortcut out here for async functions
-  if (tfunction->is_async()) {
+  if (tfunction->is_oneway()) {
     f_service_ <<
       indent() << "()" << endl;
     indent_down();

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_perl_generator.cc Tue Mar 24 20:01:02 2009
@@ -825,7 +825,7 @@
   vector<t_field*>::const_iterator x_iter;
 
   // Declare result for non async function
-  if (!tfunction->is_async()) {
+  if (!tfunction->is_oneway()) {
     f_service_ <<
       indent() << "my $result = new " << resultname << "();" << endl;
   }
@@ -843,7 +843,7 @@
   vector<t_field*>::const_iterator f_iter;
 
   f_service_ << indent();
-  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void()) {
+  if (!tfunction->is_oneway() && !tfunction->get_returntype()->is_void()) {
     f_service_ << "$result->{success} = ";
   }
   f_service_ <<
@@ -859,13 +859,13 @@
   }
   f_service_ << ");" << endl;
 
-  if (!tfunction->is_async() && xceptions.size() > 0) {
+  if (!tfunction->is_oneway() && xceptions.size() > 0) {
     indent_down();
     for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
       f_service_ <<
         indent() << "}; if( UNIVERSAL::isa($@,'"<<(*x_iter)->get_type()->get_name()<<"') ){ "<<endl;
 
-      if (!tfunction->is_async()) {
+      if (!tfunction->is_oneway()) {
         indent_up();
         f_service_ <<
           indent() << "$result->{" << (*x_iter)->get_name() << "} = $@;" << endl;
@@ -878,7 +878,7 @@
   }
 
   // Shortcut out here for async functions
-  if (tfunction->is_async()) {
+  if (tfunction->is_oneway()) {
     f_service_ <<
       indent() << "return;" << endl;
     indent_down();
@@ -1120,7 +1120,7 @@
     }
     f_service_ << ");" << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       f_service_ << indent();
       if (!(*f_iter)->get_returntype()->is_void()) {
         f_service_ << "return ";
@@ -1164,7 +1164,7 @@
     f_service_ << "}" << endl;
 
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       std::string resultname = perl_namespace(tservice->get_program()) + service_name_ + "_" + (*f_iter)->get_name() + "_result";
       t_struct noargs(program_);
 

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_php_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_php_generator.cc?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_php_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_php_generator.cc Tue Mar 24 20:01:02 2009
@@ -1058,7 +1058,7 @@
   vector<t_field*>::const_iterator x_iter;
 
   // Declare result for non async function
-  if (!tfunction->is_async()) {
+  if (!tfunction->is_oneway()) {
     f_service_ <<
       indent() << "$result = new " << resultname << "();" << endl;
   }
@@ -1076,7 +1076,7 @@
   vector<t_field*>::const_iterator f_iter;
 
   f_service_ << indent();
-  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void()) {
+  if (!tfunction->is_oneway() && !tfunction->get_returntype()->is_void()) {
     f_service_ << "$result->success = ";
   }
   f_service_ <<
@@ -1092,12 +1092,12 @@
   }
   f_service_ << ");" << endl;
 
-  if (!tfunction->is_async() && xceptions.size() > 0) {
+  if (!tfunction->is_oneway() && xceptions.size() > 0) {
     indent_down();
     for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
       f_service_ <<
         indent() << "} catch (" << php_namespace((*x_iter)->get_type()->get_program()) << (*x_iter)->get_type()->get_name() << " $" << (*x_iter)->get_name() << ") {" << endl;
-      if (!tfunction->is_async()) {
+      if (!tfunction->is_oneway()) {
         indent_up();
         f_service_ <<
           indent() << "$result->" << (*x_iter)->get_name() << " = $" << (*x_iter)->get_name() << ";" << endl;
@@ -1109,7 +1109,7 @@
   }
 
   // Shortcut out here for async functions
-  if (tfunction->is_async()) {
+  if (tfunction->is_oneway()) {
     f_service_ <<
       indent() << "return;" << endl;
     indent_down();
@@ -1169,7 +1169,7 @@
  * @param tfunction The function
  */
 void t_php_generator::generate_php_function_helpers(t_function* tfunction) {
-  if (!tfunction->is_async()) {
+  if (!tfunction->is_oneway()) {
     t_struct result(program_, service_name_ + "_" + tfunction->get_name() + "_result");
     t_field success(tfunction->get_returntype(), "success", 0);
     if (!tfunction->get_returntype()->is_void()) {
@@ -1376,7 +1376,7 @@
       }
       out << ");" << endl;
 
-      if (!(*f_iter)->is_async()) {
+      if (!(*f_iter)->is_oneway()) {
         out << indent();
         if (!(*f_iter)->get_returntype()->is_void()) {
           out << "return ";
@@ -1446,7 +1446,7 @@
     scope_down(out);
 
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       std::string resultname = php_namespace(tservice->get_program()) + service_name_ + "_" + (*f_iter)->get_name() + "_result";
       t_struct noargs(program_);
 

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc Tue Mar 24 20:01:02 2009
@@ -866,7 +866,7 @@
  * @param tfunction The function
  */
 void t_py_generator::generate_py_function_helpers(t_function* tfunction) {
-  if (!tfunction->is_async()) {
+  if (!tfunction->is_oneway()) {
     t_struct result(program_, tfunction->get_name() + "_result");
     t_field success(tfunction->get_returntype(), "success", 0);
     if (!tfunction->get_returntype()->is_void()) {
@@ -1003,7 +1003,7 @@
     indent_up();
     if (gen_twisted_) {
       indent(f_service_) << "self._seqid += 1" << endl;
-      if (!(*f_iter)->is_async()) {
+      if (!(*f_iter)->is_oneway()) {
         indent(f_service_) <<
           "d = self._reqs[self._seqid] = defer.Deferred()" << endl;
       }
@@ -1023,7 +1023,7 @@
     }
     f_service_ << ")" << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       f_service_ << indent();
       if (gen_twisted_) {
         f_service_ << "return d" << endl;
@@ -1085,7 +1085,7 @@
 
     indent_down();
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       std::string resultname = (*f_iter)->get_name() + "_result";
       // Open function
       f_service_ <<
@@ -1495,7 +1495,7 @@
   vector<t_field*>::const_iterator x_iter;
 
   // Declare result for non async function
-  if (!tfunction->is_async()) {
+  if (!tfunction->is_oneway()) {
     f_service_ <<
       indent() << "result = " << resultname << "()" << endl;
   }
@@ -1521,7 +1521,7 @@
     f_service_ << ")" << endl;
 
     // Shortcut out here for async functions
-    if (tfunction->is_async()) {
+    if (tfunction->is_oneway()) {
       f_service_ <<
         indent() << "return d" << endl;
       indent_down();
@@ -1562,7 +1562,7 @@
     f_service_ << endl;
 
     // Try block for a function with exceptions
-    if (!tfunction->is_async() && xceptions.size() > 0) {
+    if (!tfunction->is_oneway() && xceptions.size() > 0) {
       indent(f_service_) <<
         "def write_results_exception_" << tfunction->get_name() <<
         "(self, error, result, seqid, oprot):" << endl;
@@ -1576,7 +1576,7 @@
       for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
         f_service_ <<
           indent() << "except " << type_name((*x_iter)->get_type()) << ", " << (*x_iter)->get_name() << ":" << endl;
-        if (!tfunction->is_async()) {
+        if (!tfunction->is_oneway()) {
           indent_up();
           f_service_ <<
             indent() << "result." << (*x_iter)->get_name() << " = " << (*x_iter)->get_name() << endl;
@@ -1610,7 +1610,7 @@
     vector<t_field*>::const_iterator f_iter;
 
     f_service_ << indent();
-    if (!tfunction->is_async() && !tfunction->get_returntype()->is_void()) {
+    if (!tfunction->is_oneway() && !tfunction->get_returntype()->is_void()) {
       f_service_ << "result.success = ";
     }
     f_service_ <<
@@ -1626,12 +1626,12 @@
     }
     f_service_ << ")" << endl;
 
-    if (!tfunction->is_async() && xceptions.size() > 0) {
+    if (!tfunction->is_oneway() && xceptions.size() > 0) {
       indent_down();
       for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
         f_service_ <<
           indent() << "except " << type_name((*x_iter)->get_type()) << ", " << (*x_iter)->get_name() << ":" << endl;
-        if (!tfunction->is_async()) {
+        if (!tfunction->is_oneway()) {
           indent_up();
           f_service_ <<
             indent() << "result." << (*x_iter)->get_name() << " = " << (*x_iter)->get_name() << endl;
@@ -1644,7 +1644,7 @@
     }
 
     // Shortcut out here for async functions
-    if (tfunction->is_async()) {
+    if (tfunction->is_oneway()) {
       f_service_ <<
         indent() << "return" << endl;
       indent_down();

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc Tue Mar 24 20:01:02 2009
@@ -744,7 +744,7 @@
       }
       f_service_ << ")" << endl;
 
-      if (!(*f_iter)->is_async()) {
+      if (!(*f_iter)->is_oneway()) {
         f_service_ << indent();
         if (!(*f_iter)->get_returntype()->is_void()) {
           f_service_ << "return ";
@@ -773,7 +773,7 @@
     indent_down();
     indent(f_service_) << "end" << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       std::string resultname = capitalize((*f_iter)->get_name() + "_result");
       t_struct noargs(program_);
 
@@ -884,7 +884,7 @@
   vector<t_field*>::const_iterator x_iter;
 
   // Declare result for non async function
-  if (!tfunction->is_async()) {
+  if (!tfunction->is_oneway()) {
     f_service_ <<
       indent() << "result = " << resultname << ".new()" << endl;
   }
@@ -902,7 +902,7 @@
   vector<t_field*>::const_iterator f_iter;
 
   f_service_ << indent();
-  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void()) {
+  if (!tfunction->is_oneway() && !tfunction->get_returntype()->is_void()) {
     f_service_ << "result.success = ";
   }
   f_service_ <<
@@ -918,12 +918,12 @@
   }
   f_service_ << ")" << endl;
 
-  if (!tfunction->is_async() && xceptions.size() > 0) {
+  if (!tfunction->is_oneway() && xceptions.size() > 0) {
     indent_down();
     for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
       f_service_ <<
         indent() << "rescue " << full_type_name((*x_iter)->get_type()) << " => " << (*x_iter)->get_name() << endl;
-      if (!tfunction->is_async()) {
+      if (!tfunction->is_oneway()) {
         indent_up();
         f_service_ <<
           indent() << "result." << (*x_iter)->get_name() << " = " << (*x_iter)->get_name() << endl;
@@ -934,7 +934,7 @@
   }
 
   // Shortcut out here for async functions
-  if (tfunction->is_async()) {
+  if (tfunction->is_oneway()) {
     f_service_ <<
       indent() << "return" << endl;
     indent_down();

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_st_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_st_generator.cc?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_st_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_st_generator.cc Tue Mar 24 20:01:02 2009
@@ -937,14 +937,14 @@
     f_ << function_types_comment(*f_iter) << endl <<
       indent() << "self send" << capitalize(signature) << "." << endl;
 
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       f_ << indent() << "^ self recv" << capitalize(funname) << " success " << endl;
     }
 
     st_close_method(f_);
 
     generate_send_method(*f_iter);
-    if (!(*f_iter)->is_async()) {
+    if (!(*f_iter)->is_oneway()) {
       generate_recv_method(*f_iter);
     }
   }

Modified: incubator/thrift/trunk/compiler/cpp/src/parse/t_function.h
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/parse/t_function.h?rev=757989&r1=757988&r2=757989&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/parse/t_function.h (original)
+++ incubator/thrift/trunk/compiler/cpp/src/parse/t_function.h Tue Mar 24 20:01:02 2009
@@ -23,11 +23,11 @@
   t_function(t_type* returntype,
              std::string name,
              t_struct* arglist,
-             bool async=false) :
+             bool oneway=false) :
     returntype_(returntype),
     name_(name),
     arglist_(arglist),
-    async_(async) {
+    oneway_(oneway) {
     xceptions_ = new t_struct(NULL);
   }
 
@@ -35,14 +35,14 @@
              std::string name,
              t_struct* arglist,
              t_struct* xceptions,
-             bool async=false) :
+             bool oneway=false) :
     returntype_(returntype),
     name_(name),
     arglist_(arglist),
     xceptions_(xceptions),
-    async_(async)
+    oneway_(oneway)
   {
-    if (async_ && !xceptions_->get_members().empty()) {
+    if (oneway_ && !xceptions_->get_members().empty()) {
       throw std::string("Async methods can't throw exceptions.");
     }
   }
@@ -65,8 +65,8 @@
     return xceptions_;
   }
 
-  bool is_async() const {
-    return async_;
+  bool is_oneway() const {
+    return oneway_;
   }
 
  private:
@@ -74,7 +74,7 @@
   std::string name_;
   t_struct* arglist_;
   t_struct* xceptions_;
-  bool async_;
+  bool oneway_;
 };
 
 #endif