Skip to content

Commit

Permalink
Allow GetMessage API to be used for Groups.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 452208245
  • Loading branch information
Protobuf Team authored and copybara-github committed Jun 1, 2022
1 parent b28d80a commit ba18b21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion upb/mini_table_accessors.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ UPB_INLINE void upb_MiniTable_SetString(upb_Message* msg,

UPB_INLINE const upb_Message* upb_MiniTable_GetMessage(
const upb_Message* msg, const upb_MiniTable_Field* field) {
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Message);
UPB_ASSERT(field->descriptortype == kUpb_FieldType_Message ||
field->descriptortype == kUpb_FieldType_Group);
return *UPB_PTR_AT(msg, field->offset, const upb_Message*);
}

Expand Down

0 comments on commit ba18b21

Please sign in to comment.