summaryrefslogtreecommitdiff
path: root/upb/pb/decoder.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2011-08-19 23:19:36 -0700
committerJoshua Haberman <jhaberman@gmail.com>2011-08-19 23:19:36 -0700
commit282b34529fdbf4584354252eeb7de1bc061b56f9 (patch)
tree33ac48fdbd8975c19446b8501deb06fdf8277f67 /upb/pb/decoder.h
parent08e7ad94f99b5944405a40af5c28b9aa95e9c0b0 (diff)
Some source cleanup/commenting.
Diffstat (limited to 'upb/pb/decoder.h')
-rw-r--r--upb/pb/decoder.h9
1 files changed, 6 insertions, 3 deletions
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.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback