You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jf...@apache.org on 2011/10/26 04:40:14 UTC

svn commit: r1189009 - /thrift/trunk/compiler/cpp/src/generate/t_delphi_generator.cc

Author: jfarrell
Date: Wed Oct 26 02:40:14 2011
New Revision: 1189009

URL: http://svn.apache.org/viewvc?rev=1189009&view=rev
Log:
THRIFT-1405: Delphi compiler does not generates container serializer properly
Client: delphi
Patch: Kenjiro Fukumitsu

Fixess a bug in the function that generates serializer of containers


Modified:
    thrift/trunk/compiler/cpp/src/generate/t_delphi_generator.cc

Modified: thrift/trunk/compiler/cpp/src/generate/t_delphi_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_delphi_generator.cc?rev=1189009&r1=1189008&r2=1189009&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_delphi_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_delphi_generator.cc Wed Oct 26 02:40:14 2011
@@ -1941,6 +1941,9 @@ void t_delphi_generator::generate_serial
     generate_serialize_list_element(out, is_xception, (t_list*)ttype, iter, local_vars);
   }
 
+  indent_down_impl();
+  indent_impl(out) << "end;" << endl;
+
   if (ttype->is_map()) {
     indent_impl(out) << "oprot.WriteMapEnd();" << endl;
   } else if (ttype->is_set()) {
@@ -1948,9 +1951,6 @@ void t_delphi_generator::generate_serial
   } else if (ttype->is_list()) {
     indent_impl(out) << "oprot.WriteListEnd();" << endl;
   }
-
-  indent_down_impl();
-  indent_impl(out) << "end;" << endl;
 }
 
 void t_delphi_generator::generate_serialize_map_element(ostream& out, bool is_xception, t_map* tmap, string iter, string map, ostream& local_vars) {