|
|
|
@ -504,10 +504,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" { |
|
|
|
@ -529,6 +525,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 |
|
|
|
@ -630,9 +632,11 @@ UPB_INLINE void upb_gfree(void* ptr) { upb_free(&upb_alloc_global, ptr); } |
|
|
|
|
|
|
|
|
|
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" { |
|
|
|
@ -1082,6 +1086,7 @@ UPB_INLINE int upb_FieldType_SizeLg2(upb_FieldType field_type) { |
|
|
|
|
|
|
|
|
|
// Must be last.
|
|
|
|
|
|
|
|
|
|
// LINT.IfChange(struct_definition)
|
|
|
|
|
struct upb_MiniTableField { |
|
|
|
|
uint32_t number; |
|
|
|
|
uint16_t offset; |
|
|
|
@ -1240,6 +1245,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 |
|
|
|
@ -1386,6 +1393,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); |
|
|
|
@ -1406,6 +1414,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" { |
|
|
|
@ -2830,7 +2839,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) { |
|
|
|
@ -2903,6 +2911,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 |
|
|
|
@ -12228,6 +12241,7 @@ double _upb_NoLocaleStrtod(const char *str, char **endptr); |
|
|
|
|
|
|
|
|
|
typedef struct _upb_MemBlock _upb_MemBlock; |
|
|
|
|
|
|
|
|
|
// LINT.IfChange(struct_definition)
|
|
|
|
|
struct upb_Arena { |
|
|
|
|
_upb_ArenaHead head; |
|
|
|
|
|
|
|
|
@ -12256,6 +12270,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; |
|
|
|
|