From 48fedab345674000dd2f8dd4d8356ee995d9263e Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 27 Aug 2011 18:44:37 -0700 Subject: Add packed field support (untested). --- upb/pb/decoder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'upb/pb/decoder.h') diff --git a/upb/pb/decoder.h b/upb/pb/decoder.h index 9a20d76..921697a 100644 --- a/upb/pb/decoder.h +++ b/upb/pb/decoder.h @@ -52,6 +52,7 @@ typedef struct _upb_decoder { // End of the delimited region, relative to ptr, or NULL if not in this buf. const char *delim_end; + bool top_is_packed; #ifdef UPB_USE_JIT_X64 // For JIT, which doesn't do bounds checks in the middle of parsing a field. @@ -70,7 +71,7 @@ typedef struct _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 +#define UPB_NONDELIMITED UINT64_MAX // Initializes/uninitializes a decoder for calling into the given handlers // or to write into the given msgdef, given its accessors). Takes a ref -- cgit v1.2.3