If you would like to file a ticket for this issue please do so at http://issues.apache.org/jira/browse/thrift and attach the patch with ASF inclusion and we will gladly take a look into this.
Thank you -Jake On Aug 10, 2011, at 8:01 PM, ftpeng wrote: > Signed-off-by: ftpeng <[email protected]> > --- > compiler/cpp/src/generate/t_cpp_generator.cc | 12 ++++++------ > 1 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/compiler/cpp/src/generate/t_cpp_generator.cc > b/compiler/cpp/src/generate/t_cpp_generator.cc > index 472644e..7e64832 100755 > --- a/compiler/cpp/src/generate/t_cpp_generator.cc > +++ b/compiler/cpp/src/generate/t_cpp_generator.cc > @@ -3448,17 +3448,17 @@ void > t_cpp_generator::generate_deserialize_container(ofstream& out, > out << > indent() << "::apache::thrift::protocol::TType " << ktype << ";" << > endl << > indent() << "::apache::thrift::protocol::TType " << vtype << ";" << > endl << > - indent() << "iprot->readMapBegin(" << > + indent() << "xfer += iprot->readMapBegin(" << > ktype << ", " << vtype << ", " << size << ");" << endl; > } else if (ttype->is_set()) { > out << > indent() << "::apache::thrift::protocol::TType " << etype << ";" << > endl << > - indent() << "iprot->readSetBegin(" << > + indent() << "xfer += iprot->readSetBegin(" << > etype << ", " << size << ");" << endl; > } else if (ttype->is_list()) { > out << > indent() << "::apache::thrift::protocol::TType " << etype << ";" << > endl << > - indent() << "iprot->readListBegin(" << > + indent() << "xfer += iprot->readListBegin(" << > etype << ", " << size << ");" << endl; > if (!use_push) { > indent(out) << prefix << ".resize(" << size << ");" << endl; > @@ -3486,11 +3486,11 @@ void > t_cpp_generator::generate_deserialize_container(ofstream& out, > > // Read container end > if (ttype->is_map()) { > - indent(out) << "iprot->readMapEnd();" << endl; > + indent(out) << "xfer += iprot->readMapEnd();" << endl; > } else if (ttype->is_set()) { > - indent(out) << "iprot->readSetEnd();" << endl; > + indent(out) << "xfer += iprot->readSetEnd();" << endl; > } else if (ttype->is_list()) { > - indent(out) << "iprot->readListEnd();" << endl; > + indent(out) << "xfer += iprot->readListEnd();" << endl; > } > > scope_down(out); > -- > 1.7.6.msysgit.0 > > <0001-Fix-bug-generate_deserialize_container.patch> On Aug 16, 2011, at 8:19 PM, 彭福田 wrote: > Please fix it > > -----邮件原件----- > 发件人: [email protected] [mailto:[email protected]] > 发送时间: 2011年8月17日 01:14 > 收件人: [email protected] > 主题: svn commit: r1158383 - /thrift/trunk/lib/rb/Rakefile > > Author: jfarrell > Date: Tue Aug 16 17:13:41 2011 > New Revision: 1158383 > > URL: http://svn.apache.org/viewvc?rev=1158383&view=rev > Log: > Thrift-1263: Updating rb client Rakefile to add suport for publishing client > to rubygems.org > Client: Ruby > Patch: Jfarrell > > Updating Rakefile to remove deprecated functions and add support for > publishing to rubgems.org > > > > Modified: > thrift/trunk/lib/rb/Rakefile > > Modified: thrift/trunk/lib/rb/Rakefile > URL: > http://svn.apache.org/viewvc/thrift/trunk/lib/rb/Rakefile?rev=1158383&r1=1158382&r2=1158383&view=diff > ============================================================================== > --- thrift/trunk/lib/rb/Rakefile (original) > +++ thrift/trunk/lib/rb/Rakefile Tue Aug 16 17:13:41 2011 > @@ -19,7 +19,7 @@ > > require 'rubygems' > require 'rake' > -require 'spec/rake/spectask' > +require 'rspec/core/rake_task' > > THRIFT = '../../compiler/cpp/thrift' > > @@ -27,14 +27,12 @@ task :default => [:spec] > > task :spec => [:'gen-rb', :realspec] > > -Spec::Rake::SpecTask.new(:realspec) do |t| > - t.spec_files = FileList['spec/**/*_spec.rb'] > - t.spec_opts = ['--color'] > +RSpec::Core::RakeTask.new(:realspec) do |t| > + t.rspec_opts = ['--color'] > end > > -Spec::Rake::SpecTask.new(:'spec:rcov') do |t| > - t.spec_files = FileList['spec/**/*_spec.rb'] > - t.spec_opts = ['--color'] > +RSpec::Core::RakeTask.new(:'spec:rcov') do |t| > + t.rspec_opts = ['--color'] > t.rcov = true > t.rcov_opts = ['--exclude', '^spec,/gems/'] > end > @@ -102,3 +100,4 @@ rescue LoadError > end > end > end > + >
