diff -u protobuf-2.0.0~b/debian/changelog protobuf-2.0.0~b/debian/changelog --- protobuf-2.0.0~b/debian/changelog +++ protobuf-2.0.0~b/debian/changelog @@ -1,3 +1,10 @@ +protobuf (2.0.0~b-3ubuntu2) intrepid; urgency=low + + * Adding patch to stop generating trailing comma after enum definition. + Fixes (LP: #264124). + + -- Elliot Murphy Tue, 23 Sep 2008 17:48:44 -0400 + protobuf (2.0.0~b-3ubuntu1) intrepid; urgency=low * Moving python-support from Build-Depends-Indep to Build-Depends to only in patch2: unchanged: --- protobuf-2.0.0~b.orig/src/google/protobuf/compiler/cpp/cpp_enum.cc +++ protobuf-2.0.0~b/src/google/protobuf/compiler/cpp/cpp_enum.cc @@ -57,7 +57,14 @@ vars["prefix"] = (descriptor_->containing_type() == NULL) ? "" : classname_ + "_"; - printer->Print(vars, "$prefix$$name$ = $number$,\n"); + const char* enum_output; + // A trailing comma is a pedantic warning on some C++ compilers + // and so we ensure that no trailing slash is present + if (i != (descriptor_->value_count() - 1)) + enum_output = "$prefix$$name$ = $number$, \n"; + else + enum_output = "$prefix$$name$ = $number$\n"; + printer->Print(vars, enum_output); if (descriptor_->value(i)->number() < min_value->number()) { min_value = descriptor_->value(i);