Allow GetMessage API to be used for Groups.

PiperOrigin-RevId: 452208245
pull/13171/head
Protobuf Team 3 years ago committed by Copybara-Service
parent b28d80a9cc
commit ba18b21b01
  1. 3
      upb/mini_table_accessors.h

@ -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*);
}

Loading…
Cancel
Save