summaryrefslogtreecommitdiff
path: root/src/upb_decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/upb_decoder.h')
-rw-r--r--src/upb_decoder.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/upb_decoder.h b/src/upb_decoder.h
index 32a989a..bb54930 100644
--- a/src/upb_decoder.h
+++ b/src/upb_decoder.h
@@ -34,8 +34,8 @@ struct _upb_decoder {
// Dispatcher to which we push parsed data.
upb_dispatcher dispatcher;
- // Current input buffer.
- upb_string *buf;
+ // String to hold our input buffer; is only active if d->buf != NULL.
+ upb_string *bufstr;
// Temporary string for passing string data to callbacks.
upb_string *tmp;
@@ -43,18 +43,20 @@ struct _upb_decoder {
// The offset within the overall stream represented by the *beginning* of buf.
size_t buf_stream_offset;
- // Our current position in the data buffer.
- const char *ptr;
+ // Pointer to the beginning of our current data buffer, or NULL if none.
+ const char *buf;
// End of this buffer, relative to *ptr.
const char *end;
+ // Members which may also be written by the JIT:
+
+ // Our current position in the data buffer.
+ const char *ptr;
+
// End of this submessage, relative to *ptr.
const char *submsg_end;
- // The closure that was passed by the caller for the top-level message.
- void *closure;
-
// Where we will store any errors that occur.
upb_status *status;
};
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback