|
|
|
@ -4130,6 +4130,7 @@ UPB_INLINE int upb_Decode_LimitDepth(uint32_t decode_options, uint32_t limit) { |
|
|
|
|
return upb_DecodeOptions_MaxDepth(max_depth) | (decode_options & 0xffff); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// LINT.IfChange
|
|
|
|
|
typedef enum { |
|
|
|
|
kUpb_DecodeStatus_Ok = 0, |
|
|
|
|
kUpb_DecodeStatus_Malformed = 1, // Wire format was corrupt
|
|
|
|
@ -4147,6 +4148,7 @@ typedef enum { |
|
|
|
|
// of options.
|
|
|
|
|
kUpb_DecodeStatus_UnlinkedSubMessage = 6, |
|
|
|
|
} upb_DecodeStatus; |
|
|
|
|
// LINT.ThenChange(//depot/google3/third_party/protobuf/rust/upb.rs:decode_status)
|
|
|
|
|
|
|
|
|
|
UPB_API upb_DecodeStatus upb_Decode(const char* buf, size_t size, |
|
|
|
|
upb_Message* msg, const upb_MiniTable* mt, |
|
|
|
@ -4199,6 +4201,7 @@ enum { |
|
|
|
|
kUpb_EncodeOption_CheckRequired = 4, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// LINT.IfChange
|
|
|
|
|
typedef enum { |
|
|
|
|
kUpb_EncodeStatus_Ok = 0, |
|
|
|
|
kUpb_EncodeStatus_OutOfMemory = 1, // Arena alloc failed
|
|
|
|
@ -4207,6 +4210,7 @@ typedef enum { |
|
|
|
|
// kUpb_EncodeOption_CheckRequired failed but the parse otherwise succeeded.
|
|
|
|
|
kUpb_EncodeStatus_MissingRequired = 3, |
|
|
|
|
} upb_EncodeStatus; |
|
|
|
|
// LINT.ThenChange(//depot/google3/third_party/protobuf/rust/upb.rs:encode_status)
|
|
|
|
|
|
|
|
|
|
UPB_INLINE uint32_t upb_EncodeOptions_MaxDepth(uint16_t depth) { |
|
|
|
|
return (uint32_t)depth << 16; |
|
|
|
|