From d619852e06983dc30d2070f6c4af32d563b101f2 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Thu, 19 May 2011 10:56:34 -0700 Subject: Change dispatcher error handling model. Now the dispatcher will call error handlers instaed of returning statuses that the caller has to constantly check. --- src/upb_decoder.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/upb_decoder.h') diff --git a/src/upb_decoder.h b/src/upb_decoder.h index 56df810..a98b235 100644 --- a/src/upb_decoder.h +++ b/src/upb_decoder.h @@ -78,6 +78,14 @@ struct _upb_decoder { sigjmp_buf exitjmp; }; +// For use in the upb_dispatcher's stack. +typedef struct { + // Relative to the beginning of this buffer. + // For groups and the top-level: UINT32_MAX. + uint32_t end_offset; + bool is_packed; // == !upb_issubmsg(f) && end_offset != UPB_REPATEDEND +} upb_decoder_srcdata; + // A upb_decoder decodes the binary protocol buffer format, writing the data it // decodes to a upb_sink. struct _upb_decoder; -- cgit v1.2.3