From 282b34529fdbf4584354252eeb7de1bc061b56f9 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 19 Aug 2011 23:19:36 -0700 Subject: Some source cleanup/commenting. --- upb/pb/decoder.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'upb/pb/decoder.h') 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. -- cgit v1.2.3