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/31 15:13:13 UTC
svn commit: r1195466 -
/thrift/trunk/compiler/cpp/src/generate/t_delphi_generator.cc
Author: jfarrell
Date: Mon Oct 31 14:13:13 2011
New Revision: 1195466
URL: http://svn.apache.org/viewvc?rev=1195466&view=rev
Log:
THRIFT-1413: Generated code does not read MapEnd / ListEnd / SetEnd
Client: delphi
Patch: Jens Geyer
The generated code lacks calls to ReadMapEnd, ReadListEnd and ReadSetEnd. Although actually no problem occurs with the BinaryProtocol, other protocols (like JSON) do some important things there.
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=1195466&r1=1195465&r2=1195466&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_delphi_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_delphi_generator.cc Mon Oct 31 14:13:13 2011
@@ -1765,6 +1765,14 @@ void t_delphi_generator::generate_deseri
}
indent_down_impl();
indent_impl(out) << "end;" << endl;
+
+ if (ttype->is_map()) {
+ indent_impl(out) << "iprot.ReadMapEnd();" << endl;
+ } else if (ttype->is_set()) {
+ indent_impl(out) << "iprot.ReadSetEnd();" << endl;
+ } else if (ttype->is_list()) {
+ indent_impl(out) << "iprot.ReadListEnd();" << endl;
+ }
}
void t_delphi_generator::generate_deserialize_map_element(ostream& out, bool is_xception, t_map* tmap, string prefix, ostream& local_vars) {