Auto-generate files after cl/592107014

pull/15114/head^2
Protobuf Team Bot 12 months ago
parent 1587fefee7
commit 5b343374e7
  1. 13
      php/ext/google/protobuf/php-upb.c
  2. 31
      php/ext/google/protobuf/php-upb.h
  3. 13
      ruby/ext/google/protobuf_c/ruby-upb.c
  4. 31
      ruby/ext/google/protobuf_c/ruby-upb.h

@ -5961,11 +5961,9 @@ const upb_Extension* upb_Message_FindExtensionByNumber(const upb_Message* msg,
// Must be last. // Must be last.
upb_MapInsertStatus upb_Message_InsertMapEntry(upb_Map* map, bool upb_Message_SetMapEntry(upb_Map* map, const upb_MiniTable* mini_table,
const upb_MiniTable* mini_table, const upb_MiniTableField* f,
const upb_MiniTableField* f, upb_Message* map_entry_message, upb_Arena* arena) {
upb_Message* map_entry_message,
upb_Arena* arena) {
// TODO: use a variant of upb_MiniTable_GetSubMessageTable() here. // TODO: use a variant of upb_MiniTable_GetSubMessageTable() here.
const upb_MiniTable* map_entry_mini_table = upb_MiniTableSub_Message( const upb_MiniTable* map_entry_mini_table = upb_MiniTableSub_Message(
mini_table->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]); mini_table->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]);
@ -5983,7 +5981,7 @@ upb_MapInsertStatus upb_Message_InsertMapEntry(upb_Map* map,
upb_Message_GetField(map_entry_message, map_entry_key_field, default_val); upb_Message_GetField(map_entry_message, map_entry_key_field, default_val);
upb_MessageValue map_entry_value = upb_Message_GetField( upb_MessageValue map_entry_value = upb_Message_GetField(
map_entry_message, map_entry_value_field, default_val); 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, bool upb_Message_IsExactlyEqual(const upb_Message* m1, const upb_Message* m2,
@ -6090,8 +6088,7 @@ upb_Map* upb_Map_DeepClone(const upb_Map* map, upb_CType key_type,
if (!upb_Clone_MessageValue(&val, value_field_type, value_sub, arena)) { if (!upb_Clone_MessageValue(&val, value_field_type, value_sub, arena)) {
return NULL; return NULL;
} }
if (upb_Map_Insert(cloned_map, key, val, arena) == if (!upb_Map_Set(cloned_map, key, val, arena)) {
kUpb_MapInsertStatus_OutOfMemory) {
return NULL; return NULL;
} }
} }

@ -1792,8 +1792,11 @@ const upb_Extension* _upb_Message_Getext(const upb_Message* msg,
// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// // EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE /////////////////////////
#ifndef UPB_COLLECTIONS_INTERNAL_MAP_H_ #ifndef UPB_MESSAGE_INTERNAL_MAP_H_
#define UPB_COLLECTIONS_INTERNAL_MAP_H_ #define UPB_MESSAGE_INTERNAL_MAP_H_
#include <stddef.h>
#include <string.h>
#ifndef UPB_HASH_STR_TABLE_H_ #ifndef UPB_HASH_STR_TABLE_H_
@ -2336,7 +2339,7 @@ upb_Map* _upb_Map_New(upb_Arena* a, size_t key_size, size_t value_size);
#endif #endif
#endif /* UPB_COLLECTIONS_INTERNAL_MAP_H_ */ #endif /* UPB_MESSAGE_INTERNAL_MAP_H_ */
/* /*
** Our memory representation for parsing tables and messages themselves. ** Our memory representation for parsing tables and messages themselves.
@ -3352,11 +3355,9 @@ UPB_API_INLINE upb_Map* upb_Message_GetOrCreateMutableMap(
} }
// Updates a map entry given an entry message. // Updates a map entry given an entry message.
upb_MapInsertStatus upb_Message_InsertMapEntry(upb_Map* map, bool upb_Message_SetMapEntry(upb_Map* map, const upb_MiniTable* mini_table,
const upb_MiniTable* mini_table, const upb_MiniTableField* field,
const upb_MiniTableField* field, upb_Message* map_entry_message, upb_Arena* arena);
upb_Message* map_entry_message,
upb_Arena* arena);
// Compares two messages by serializing them and calling memcmp(). // Compares two messages by serializing them and calling memcmp().
bool upb_Message_IsExactlyEqual(const upb_Message* m1, const upb_Message* m2, bool upb_Message_IsExactlyEqual(const upb_Message* m1, const upb_Message* m2,
@ -12346,14 +12347,16 @@ void upb_Message_ShallowCopy(upb_Message* dst, const upb_Message* src,
// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// // EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE /////////////////////////
#ifndef UPB_COLLECTIONS_INTERNAL_MAP_SORTER_H_ #ifndef UPB_MESSAGE_INTERNAL_MAP_SORTER_H_
#define UPB_COLLECTIONS_INTERNAL_MAP_SORTER_H_ #define UPB_MESSAGE_INTERNAL_MAP_SORTER_H_
#include <stdlib.h> #include <stdlib.h>
#ifndef UPB_COLLECTIONS_INTERNAL_MAP_ENTRY_H_ #ifndef UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_
#define UPB_COLLECTIONS_INTERNAL_MAP_ENTRY_H_ #define UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_
#include <stdint.h>
// Map entries aren't actually stored for map fields, they are only used during // Map entries aren't actually stored for map fields, they are only used during
@ -12384,7 +12387,7 @@ typedef struct {
upb_MapEntryData data; upb_MapEntryData data;
} upb_MapEntry; } upb_MapEntry;
#endif // UPB_COLLECTIONS_INTERNAL_MAP_ENTRY_H_ #endif // UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_
// Must be last. // Must be last.
@ -12453,7 +12456,7 @@ bool _upb_mapsorter_pushexts(_upb_mapsorter* s, const upb_Extension* exts,
#endif #endif
#endif /* UPB_COLLECTIONS_INTERNAL_MAP_SORTER_H_ */ #endif /* UPB_MESSAGE_INTERNAL_MAP_SORTER_H_ */
#ifndef UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_ #ifndef UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_
#define UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_ #define UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_

@ -5475,11 +5475,9 @@ const upb_Extension* upb_Message_FindExtensionByNumber(const upb_Message* msg,
// Must be last. // Must be last.
upb_MapInsertStatus upb_Message_InsertMapEntry(upb_Map* map, bool upb_Message_SetMapEntry(upb_Map* map, const upb_MiniTable* mini_table,
const upb_MiniTable* mini_table, const upb_MiniTableField* f,
const upb_MiniTableField* f, upb_Message* map_entry_message, upb_Arena* arena) {
upb_Message* map_entry_message,
upb_Arena* arena) {
// TODO: use a variant of upb_MiniTable_GetSubMessageTable() here. // TODO: use a variant of upb_MiniTable_GetSubMessageTable() here.
const upb_MiniTable* map_entry_mini_table = upb_MiniTableSub_Message( const upb_MiniTable* map_entry_mini_table = upb_MiniTableSub_Message(
mini_table->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]); mini_table->UPB_PRIVATE(subs)[f->UPB_PRIVATE(submsg_index)]);
@ -5497,7 +5495,7 @@ upb_MapInsertStatus upb_Message_InsertMapEntry(upb_Map* map,
upb_Message_GetField(map_entry_message, map_entry_key_field, default_val); upb_Message_GetField(map_entry_message, map_entry_key_field, default_val);
upb_MessageValue map_entry_value = upb_Message_GetField( upb_MessageValue map_entry_value = upb_Message_GetField(
map_entry_message, map_entry_value_field, default_val); 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, bool upb_Message_IsExactlyEqual(const upb_Message* m1, const upb_Message* m2,
@ -5604,8 +5602,7 @@ upb_Map* upb_Map_DeepClone(const upb_Map* map, upb_CType key_type,
if (!upb_Clone_MessageValue(&val, value_field_type, value_sub, arena)) { if (!upb_Clone_MessageValue(&val, value_field_type, value_sub, arena)) {
return NULL; return NULL;
} }
if (upb_Map_Insert(cloned_map, key, val, arena) == if (!upb_Map_Set(cloned_map, key, val, arena)) {
kUpb_MapInsertStatus_OutOfMemory) {
return NULL; return NULL;
} }
} }

@ -1794,8 +1794,11 @@ const upb_Extension* _upb_Message_Getext(const upb_Message* msg,
// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// // EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE /////////////////////////
#ifndef UPB_COLLECTIONS_INTERNAL_MAP_H_ #ifndef UPB_MESSAGE_INTERNAL_MAP_H_
#define UPB_COLLECTIONS_INTERNAL_MAP_H_ #define UPB_MESSAGE_INTERNAL_MAP_H_
#include <stddef.h>
#include <string.h>
#ifndef UPB_HASH_STR_TABLE_H_ #ifndef UPB_HASH_STR_TABLE_H_
@ -2338,7 +2341,7 @@ upb_Map* _upb_Map_New(upb_Arena* a, size_t key_size, size_t value_size);
#endif #endif
#endif /* UPB_COLLECTIONS_INTERNAL_MAP_H_ */ #endif /* UPB_MESSAGE_INTERNAL_MAP_H_ */
/* /*
** Our memory representation for parsing tables and messages themselves. ** Our memory representation for parsing tables and messages themselves.
@ -3354,11 +3357,9 @@ UPB_API_INLINE upb_Map* upb_Message_GetOrCreateMutableMap(
} }
// Updates a map entry given an entry message. // Updates a map entry given an entry message.
upb_MapInsertStatus upb_Message_InsertMapEntry(upb_Map* map, bool upb_Message_SetMapEntry(upb_Map* map, const upb_MiniTable* mini_table,
const upb_MiniTable* mini_table, const upb_MiniTableField* field,
const upb_MiniTableField* field, upb_Message* map_entry_message, upb_Arena* arena);
upb_Message* map_entry_message,
upb_Arena* arena);
// Compares two messages by serializing them and calling memcmp(). // Compares two messages by serializing them and calling memcmp().
bool upb_Message_IsExactlyEqual(const upb_Message* m1, const upb_Message* m2, bool upb_Message_IsExactlyEqual(const upb_Message* m1, const upb_Message* m2,
@ -12118,14 +12119,16 @@ void upb_Message_ShallowCopy(upb_Message* dst, const upb_Message* src,
// EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE ///////////////////////// // EVERYTHING BELOW THIS LINE IS INTERNAL - DO NOT USE /////////////////////////
#ifndef UPB_COLLECTIONS_INTERNAL_MAP_SORTER_H_ #ifndef UPB_MESSAGE_INTERNAL_MAP_SORTER_H_
#define UPB_COLLECTIONS_INTERNAL_MAP_SORTER_H_ #define UPB_MESSAGE_INTERNAL_MAP_SORTER_H_
#include <stdlib.h> #include <stdlib.h>
#ifndef UPB_COLLECTIONS_INTERNAL_MAP_ENTRY_H_ #ifndef UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_
#define UPB_COLLECTIONS_INTERNAL_MAP_ENTRY_H_ #define UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_
#include <stdint.h>
// Map entries aren't actually stored for map fields, they are only used during // Map entries aren't actually stored for map fields, they are only used during
@ -12156,7 +12159,7 @@ typedef struct {
upb_MapEntryData data; upb_MapEntryData data;
} upb_MapEntry; } upb_MapEntry;
#endif // UPB_COLLECTIONS_INTERNAL_MAP_ENTRY_H_ #endif // UPB_MESSAGE_INTERNAL_MAP_ENTRY_H_
// Must be last. // Must be last.
@ -12225,7 +12228,7 @@ bool _upb_mapsorter_pushexts(_upb_mapsorter* s, const upb_Extension* exts,
#endif #endif
#endif /* UPB_COLLECTIONS_INTERNAL_MAP_SORTER_H_ */ #endif /* UPB_MESSAGE_INTERNAL_MAP_SORTER_H_ */
#ifndef UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_ #ifndef UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_
#define UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_ #define UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_

Loading…
Cancel
Save