mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
Auto-generate files after cl/947760935
This commit is contained in:
parent
5ddbde2d44
commit
3bc006d2c1
2 changed files with 24 additions and 4 deletions
|
|
@ -4395,12 +4395,22 @@ extern "C" {
|
|||
|
||||
// Hasbit access ///////////////////////////////////////////////////////////////
|
||||
|
||||
UPB_INLINE bool UPB_PRIVATE(_upb_Message_GetHasbitFromOffset)(
|
||||
const struct upb_Message* msg, int byte_offset, int bit_mask) {
|
||||
return (*UPB_PTR_AT(msg, byte_offset, const char) & bit_mask) != 0;
|
||||
}
|
||||
|
||||
UPB_INLINE bool UPB_PRIVATE(_upb_Message_GetHasbit)(
|
||||
const struct upb_Message* msg, const upb_MiniTableField* f) {
|
||||
const uint16_t offset = UPB_PRIVATE(_upb_MiniTableField_HasbitOffset)(f);
|
||||
const char mask = UPB_PRIVATE(_upb_MiniTableField_HasbitMask)(f);
|
||||
|
||||
return (*UPB_PTR_AT(msg, offset, const char) & mask) != 0;
|
||||
return UPB_PRIVATE(_upb_Message_GetHasbitFromOffset)(msg, offset, mask);
|
||||
}
|
||||
|
||||
UPB_INLINE void UPB_PRIVATE(_upb_Message_SetHasbitFromOffset)(
|
||||
const struct upb_Message* msg, int byte_offset, int bit_mask) {
|
||||
(*UPB_PTR_AT(msg, byte_offset, char)) |= bit_mask;
|
||||
}
|
||||
|
||||
UPB_INLINE void UPB_PRIVATE(_upb_Message_SetHasbit)(
|
||||
|
|
@ -4408,7 +4418,7 @@ UPB_INLINE void UPB_PRIVATE(_upb_Message_SetHasbit)(
|
|||
const uint16_t offset = UPB_PRIVATE(_upb_MiniTableField_HasbitOffset)(f);
|
||||
const char mask = UPB_PRIVATE(_upb_MiniTableField_HasbitMask)(f);
|
||||
|
||||
(*UPB_PTR_AT(msg, offset, char)) |= mask;
|
||||
UPB_PRIVATE(_upb_Message_SetHasbitFromOffset)(msg, offset, mask);
|
||||
}
|
||||
|
||||
UPB_INLINE void UPB_PRIVATE(_upb_Message_ClearHasbit)(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue