diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2011-08-27 18:44:37 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2011-08-27 18:44:37 -0700 |
commit | 48fedab345674000dd2f8dd4d8356ee995d9263e (patch) | |
tree | ba5faf3637e6963d45168f1e532ac3c9734569c0 /upb/handlers.h | |
parent | c03802b0f18a1a654f832ddff01a5bd78efbc4d6 (diff) |
Add packed field support (untested).
Diffstat (limited to 'upb/handlers.h')
-rw-r--r-- | upb/handlers.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/upb/handlers.h b/upb/handlers.h index 3a9509a..2e44318 100644 --- a/upb/handlers.h +++ b/upb/handlers.h @@ -303,6 +303,9 @@ INLINE upb_mhandlers *upb_handlers_reghandlerset(upb_handlers *h, upb_msgdef *m, /* upb_dispatcher *************************************************************/ +// WARNING: upb_dispatcher should be considered INTERNAL-ONLY. The interface +// between it and upb_decoder is somewhat tightly coupled and may change. +// // upb_dispatcher can be used by sources of data to invoke the appropriate // handlers on a upb_handlers object. Besides maintaining the runtime stack of // closures and handlers, the dispatcher checks the return status of user @@ -340,6 +343,7 @@ typedef struct { upb_skip_handler *skip; upb_exit_handler *exit; void *srcclosure; + bool top_is_implicit; // Stack. upb_status status; @@ -352,8 +356,9 @@ void upb_dispatcher_init(upb_dispatcher *d, upb_handlers *h, upb_dispatcher_frame *upb_dispatcher_reset(upb_dispatcher *d, void *topclosure); void upb_dispatcher_uninit(upb_dispatcher *d); -// Tests whether the runtime stack is in the base level message. -bool upb_dispatcher_stackempty(upb_dispatcher *d); +// Tests whether the message could legally end here (either the stack is empty +// or the only open stack frame is implicit). +bool upb_dispatcher_islegalend(upb_dispatcher *d); // Looks up a field by number for the current message. INLINE upb_fhandlers *upb_dispatcher_lookup(upb_dispatcher *d, uint32_t n) { |