From 137fea686ee77a6f61e60f8201459df9c6038ab9 Mon Sep 17 00:00:00 2001 From: Bryan Duxbury Date: Mon, 28 Mar 2011 14:52:25 +0000 Subject: [PATCH] THRIFT-1120. csharp: proto.WriteListEnd being called in the wrong place Patch: guoyunfeng git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1086260 13f79535-47bb-0310-9956-ffa450edef68 --- compiler/cpp/src/generate/t_csharp_generator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/cpp/src/generate/t_csharp_generator.cc b/compiler/cpp/src/generate/t_csharp_generator.cc index 45ed646b..93a39f97 100644 --- a/compiler/cpp/src/generate/t_csharp_generator.cc +++ b/compiler/cpp/src/generate/t_csharp_generator.cc @@ -1488,6 +1488,8 @@ void t_csharp_generator::generate_serialize_container(ofstream& out, t_type* tty generate_serialize_list_element(out, (t_list*)ttype, iter); } + scope_down(out); + if (ttype->is_map()) { indent(out) << "oprot.WriteMapEnd();" << endl; } else if (ttype->is_set()) { @@ -1497,7 +1499,6 @@ void t_csharp_generator::generate_serialize_container(ofstream& out, t_type* tty } scope_down(out); - scope_down(out); } void t_csharp_generator::generate_serialize_map_element(ofstream& out, t_map* tmap, string iter, string map) { -- 2.17.1