PiperOrigin-RevId: 587060845
pull/14901/head
Protobuf Team Bot 1 year ago committed by Copybara-Service
parent fedcd62136
commit 2ff245ef18
  1. 10
      upb/base/string_view.h
  2. 2
      upb/mem/arena.h
  3. 2
      upb/mem/internal/arena.h
  4. 6
      upb/message/internal/array.h
  5. 3
      upb/mini_table/internal/field.h
  6. 2
      upb/mini_table/internal/message.h

@ -24,10 +24,6 @@ typedef struct {
const char* data;
size_t size;
} upb_StringView;
// LINT.ThenChange(
// GoogleInternalName0,
// //depot/google3/third_party/upb/bits/golang/accessor.go:map_go_string
// )
#ifdef __cplusplus
extern "C" {
@ -49,6 +45,12 @@ UPB_INLINE bool upb_StringView_IsEqual(upb_StringView a, upb_StringView b) {
return a.size == b.size && memcmp(a.data, b.data, a.size) == 0;
}
// LINT.ThenChange(
// GoogleInternalName0,
// //depot/google3/third_party/upb/bits/golang/accessor.go:map_go_string,
// //depot/google3/third_party/upb/bits/typescript/string_view.ts
// )
#ifdef __cplusplus
} /* extern "C" */
#endif

@ -31,9 +31,11 @@
typedef struct upb_Arena upb_Arena;
// LINT.IfChange(struct_definition)
typedef struct {
char *ptr, *end;
} _upb_ArenaHead;
// LINT.ThenChange(//depot/google3/third_party/upb/bits/typescript/arena.ts)
#ifdef __cplusplus
extern "C" {

@ -15,6 +15,7 @@
typedef struct _upb_MemBlock _upb_MemBlock;
// LINT.IfChange(struct_definition)
struct upb_Arena {
_upb_ArenaHead head;
@ -43,6 +44,7 @@ struct upb_Arena {
// upb_Arena_SpaceAllocated().
UPB_ATOMIC(_upb_MemBlock*) blocks;
};
// LINT.ThenChange(//depot/google3/third_party/upb/bits/typescript/arena.ts)
UPB_INLINE bool _upb_Arena_IsTaggedRefcount(uintptr_t parent_or_count) {
return (parent_or_count & 1) == 1;

@ -38,7 +38,6 @@ struct upb_Array {
size_t size; // The number of elements in the array.
size_t UPB_PRIVATE(capacity); // Allocated storage. Measured in elements.
};
// LINT.ThenChange(GoogleInternalName1)
UPB_INLINE void UPB_PRIVATE(_upb_Array_SetTaggedPtr)(upb_Array* array,
void* data, size_t lg2) {
@ -111,6 +110,11 @@ UPB_INLINE void UPB_PRIVATE(_upb_Array_Set)(upb_Array* array, size_t i,
memcpy(arr_data + (i * elem_size), data, elem_size);
}
// LINT.ThenChange(
// GoogleInternalName1,
// //depot/google3/third_party/upb/bits/typescript/array.ts
//)
#ifdef __cplusplus
} /* extern "C" */
#endif

@ -17,6 +17,7 @@
// Must be last.
#include "upb/port/def.inc"
// LINT.IfChange(struct_definition)
struct upb_MiniTableField {
uint32_t number;
uint16_t offset;
@ -175,6 +176,8 @@ UPB_INLINE size_t UPB_PRIVATE(_upb_MiniTableField_ElemSizeLg2)(
return upb_FieldType_SizeLg2((upb_FieldType)f->UPB_PRIVATE(descriptortype));
}
// LINT.ThenChange(//depot/google3/third_party/upb/bits/typescript/mini_table_field.ts)
#ifdef __cplusplus
} /* extern "C" */
#endif

@ -39,6 +39,7 @@ typedef enum {
// upb_MiniTable represents the memory layout of a given upb_MessageDef.
// The members are public so generated code can initialize them,
// but users MUST NOT directly read or write any of its members.
// LINT.IfChange(minitable_struct_definition)
struct upb_MiniTable {
const union upb_MiniTableSub* UPB_PRIVATE(subs);
const struct upb_MiniTableField* UPB_ONLYBITS(fields);
@ -59,6 +60,7 @@ struct upb_MiniTable {
// of flexible array members is a GNU extension, not in C99 unfortunately.
_upb_FastTable_Entry UPB_PRIVATE(fasttable)[];
};
// LINT.ThenChange(//depot/google3/third_party/upb/bits/typescript/mini_table.ts)
#ifdef __cplusplus
extern "C" {

Loading…
Cancel
Save