Updated Branches:
  refs/heads/master 97cc95b24 -> 7cf085e6c

THRIFT-1772 Serialization does not check types of embedded structures.
Client: python
Patch: Avi Flamholz

clean up references to php only, no functional changes


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/f7be519e
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/f7be519e
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/f7be519e

Branch: refs/heads/master
Commit: f7be519e08d2c699e02aee691b3351441040df92
Parents: fd7ddef
Author: Henrique Mendonça <[email protected]>
Authored: Thu Sep 19 12:30:05 2013 +0200
Committer: Henrique Mendonça <[email protected]>
Committed: Thu Sep 19 12:30:05 2013 +0200

----------------------------------------------------------------------
 compiler/cpp/src/generate/t_py_generator.cc | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/f7be519e/compiler/cpp/src/generate/t_py_generator.cc
----------------------------------------------------------------------
diff --git a/compiler/cpp/src/generate/t_py_generator.cc 
b/compiler/cpp/src/generate/t_py_generator.cc
index 4a540f2..e215195 100644
--- a/compiler/cpp/src/generate/t_py_generator.cc
+++ b/compiler/cpp/src/generate/t_py_generator.cc
@@ -949,8 +949,7 @@ void t_py_generator::generate_py_struct_writer(ofstream& 
out,
   const vector<t_field*>& fields = tstruct->get_sorted_members();
   vector<t_field*>::const_iterator f_iter;
 
-  indent(out) <<
-    "def write(self, oprot):" << endl;
+  indent(out) << "def write(self, oprot):" << endl;
   indent_up();
 
   indent(out) <<
@@ -1062,7 +1061,7 @@ void t_py_generator::generate_service(t_service* 
tservice) {
 
   f_service_ << endl;
 
-  // Generate the three main parts of the service (well, two for now in PHP)
+  // Generate the three main parts of the service
   generate_service_interface(tservice);
   generate_service_client(tservice);
   generate_service_server(tservice);
@@ -2180,7 +2179,7 @@ void t_py_generator::generate_deserialize_field(ofstream 
&out,
         out << "readDouble();";
         break;
       default:
-        throw "compiler error: no PHP name for base type " + 
t_base_type::t_base_name(tbase);
+        throw "compiler error: no Python name for base type " + 
t_base_type::t_base_name(tbase);
       }
     } else if (type->is_enum()) {
       out << "readI32();";
@@ -2378,7 +2377,7 @@ void t_py_generator::generate_serialize_field(ofstream 
&out,
         out << "writeDouble(" << name << ")";
         break;
       default:
-        throw "compiler error: no PHP name for base type " + 
t_base_type::t_base_name(tbase);
+        throw "compiler error: no Python name for base type " + 
t_base_type::t_base_name(tbase);
       }
     } else if (type->is_enum()) {
       out << "writeI32(" << name << ")";
@@ -2402,8 +2401,7 @@ void t_py_generator::generate_serialize_struct(ofstream 
&out,
                                                t_struct* tstruct,
                                                string prefix) {
   (void) tstruct;
-  indent(out) <<
-    prefix << ".write(oprot)" << endl;
+  indent(out) << prefix << ".write(oprot)" << endl;
 }
 
 void t_py_generator::generate_serialize_container(ofstream &out,

Reply via email to