|
|
|
@ -2011,7 +2011,7 @@ const struct upb_Extension* UPB_PRIVATE(_upb_Message_Getexts)( |
|
|
|
|
|
|
|
|
|
// Returns an extension for a message with a given mini table,
|
|
|
|
|
// or NULL if no extension exists with this mini table.
|
|
|
|
|
const struct upb_Extension* _upb_Message_Getext( |
|
|
|
|
const struct upb_Extension* UPB_PRIVATE(_upb_Message_Getext)( |
|
|
|
|
const struct upb_Message* msg, const upb_MiniTableExtension* ext); |
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
@ -2739,7 +2739,7 @@ UPB_INLINE bool UPB_PRIVATE(_upb_Message_HasBaseField)( |
|
|
|
|
UPB_INLINE bool UPB_PRIVATE(_upb_Message_HasExtension)( |
|
|
|
|
const struct upb_Message* msg, const upb_MiniTableExtension* ext) { |
|
|
|
|
UPB_ASSERT(upb_MiniTableField_HasPresence(&ext->UPB_PRIVATE(field))); |
|
|
|
|
return _upb_Message_Getext(msg, ext) != NULL; |
|
|
|
|
return UPB_PRIVATE(_upb_Message_Getext)(msg, ext) != NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static UPB_FORCEINLINE void _upb_Message_GetNonExtensionField( |
|
|
|
@ -2759,7 +2759,8 @@ static UPB_FORCEINLINE void _upb_Message_GetNonExtensionField( |
|
|
|
|
UPB_INLINE void _upb_Message_GetExtensionField( |
|
|
|
|
const struct upb_Message* msg, const upb_MiniTableExtension* mt_ext, |
|
|
|
|
const void* default_val, void* val) { |
|
|
|
|
const struct upb_Extension* ext = _upb_Message_Getext(msg, mt_ext); |
|
|
|
|
const struct upb_Extension* ext = |
|
|
|
|
UPB_PRIVATE(_upb_Message_Getext)(msg, mt_ext); |
|
|
|
|
const upb_MiniTableField* f = &mt_ext->UPB_PRIVATE(field); |
|
|
|
|
UPB_ASSUME(upb_MiniTableField_IsExtension(f)); |
|
|
|
|
|
|
|
|
@ -2815,7 +2816,7 @@ UPB_INLINE void UPB_PRIVATE(_upb_Message_ClearExtension)( |
|
|
|
|
const struct upb_Extension* base = |
|
|
|
|
UPB_PTR_AT(in, in->ext_begin, struct upb_Extension); |
|
|
|
|
struct upb_Extension* ext = |
|
|
|
|
(struct upb_Extension*)_upb_Message_Getext(msg, e); |
|
|
|
|
(struct upb_Extension*)UPB_PRIVATE(_upb_Message_Getext)(msg, e); |
|
|
|
|
if (ext) { |
|
|
|
|
*ext = *base; |
|
|
|
|
in->ext_begin += sizeof(struct upb_Extension); |
|
|
|
|