Skip to content

Commit

Permalink
Add support for delimited message encoding.
Browse files Browse the repository at this point in the history
This is basically looking at a message as a group
for a field.

PiperOrigin-RevId: 699368213
  • Loading branch information
Jonathan Godbout authored and copybara-github committed Nov 23, 2024
1 parent d2bb408 commit 04b943f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion protoc/field.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ const std::string FieldLispDefault(const FieldDescriptor* field) {
const std::string FieldLispName(const FieldDescriptor* field) {
if (field->options().HasExtension(lisp_slot)) {
return field->options().GetExtension(lisp_slot);
} else if (field->type() == FieldDescriptor::TYPE_GROUP) {
} else if (field->type() == FieldDescriptor::TYPE_GROUP &&
internal::cpp::IsGroupLike(*field)) {
// For groups the field name and message name are derived from the same
// string. For "group FooBar {" the field name is "foobar" so we use the
// message name instead, to get the correct hyphenation.
Expand Down

0 comments on commit 04b943f

Please sign in to comment.