diff options
Diffstat (limited to 'upb/pb/decoder.h')
-rw-r--r-- | upb/pb/decoder.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/upb/pb/decoder.h b/upb/pb/decoder.h index 3981359..9a20d76 100644 --- a/upb/pb/decoder.h +++ b/upb/pb/decoder.h @@ -50,9 +50,8 @@ typedef struct _upb_decoder { // UPB_TRYAGAIN (or in the future, UPB_SUSPEND). const char *completed_ptr; - // End of the delimited region, relative to ptr, or UINTPTR_MAX if not in - // this buf. - uintptr_t delim_end; + // End of the delimited region, relative to ptr, or NULL if not in this buf. + const char *delim_end; #ifdef UPB_USE_JIT_X64 // For JIT, which doesn't do bounds checks in the middle of parsing a field. @@ -69,6 +68,10 @@ typedef struct _upb_decoder { sigjmp_buf exitjmp; } upb_decoder; +// Used for frames that have no specific end offset: groups, repeated primitive +// fields inside groups, and the top-level message. +#define UPB_NONDELIMITED UINT32_MAX + // Initializes/uninitializes a decoder for calling into the given handlers // or to write into the given msgdef, given its accessors). Takes a ref // on the handlers or msgdef. |