|
|
|
@ -21,11 +21,9 @@ |
|
|
|
|
// Must be last.
|
|
|
|
|
#include "upb/port/def.inc" |
|
|
|
|
|
|
|
|
|
upb_MapInsertStatus upb_Message_InsertMapEntry(upb_Map* map, |
|
|
|
|
const upb_MiniTable* mini_table, |
|
|
|
|
const upb_MiniTableField* f, |
|
|
|
|
upb_Message* map_entry_message, |
|
|
|
|
upb_Arena* arena) { |
|
|
|
|
bool upb_Message_SetMapEntry(upb_Map* map, const upb_MiniTable* mini_table, |
|
|
|
|
const upb_MiniTableField* f, |
|
|
|
|
upb_Message* map_entry_message, upb_Arena* arena) { |
|
|
|
|
// TODO: use a variant of upb_MiniTable_GetSubMessageTable() here.
|
|
|
|
|
const upb_MiniTable* map_entry_mini_table = upb_MiniTableSub_Message( |
|
|
|
|
mini_table->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]); |
|
|
|
@ -43,7 +41,7 @@ upb_MapInsertStatus upb_Message_InsertMapEntry(upb_Map* map, |
|
|
|
|
upb_Message_GetField(map_entry_message, map_entry_key_field, default_val); |
|
|
|
|
upb_MessageValue map_entry_value = upb_Message_GetField( |
|
|
|
|
map_entry_message, map_entry_value_field, default_val); |
|
|
|
|
return upb_Map_Insert(map, map_entry_key, map_entry_value, arena); |
|
|
|
|
return upb_Map_Set(map, map_entry_key, map_entry_value, arena); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool upb_Message_IsExactlyEqual(const upb_Message* m1, const upb_Message* m2, |
|
|
|
|