summaryrefslogtreecommitdiff
path: root/upb/pb
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2019-01-15 03:37:34 -0800
committerJoshua Haberman <jhaberman@gmail.com>2019-01-15 03:37:34 -0800
commit754b9f1cfdf59104fa62cfaf99f21e5a817d281b (patch)
tree4272965f29708dcdc72fef096d85569c1dd59643 /upb/pb
parentcb26d883d1290ed258e5594454c2ffe0526b13f9 (diff)
All tests pass again!
Diffstat (limited to 'upb/pb')
-rw-r--r--upb/pb/decoder.c4
-rw-r--r--upb/pb/decoder.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/upb/pb/decoder.c b/upb/pb/decoder.c
index 5068225..f1617db 100644
--- a/upb/pb/decoder.c
+++ b/upb/pb/decoder.c
@@ -991,7 +991,7 @@ void upb_pbdecoder_reset(upb_pbdecoder *d) {
}
upb_pbdecoder *upb_pbdecoder_create(upb_arena *a, const upb_pbdecodermethod *m,
- upb_sink sink) {
+ upb_sink sink, upb_status *status) {
const size_t default_max_nesting = 64;
#ifndef NDEBUG
size_t size_before = upb_arena_bytesallocated(a);
@@ -1010,7 +1010,7 @@ upb_pbdecoder *upb_pbdecoder_create(upb_arena *a, const upb_pbdecodermethod *m,
d->arena = a;
d->limit = d->stack + default_max_nesting - 1;
d->stack_size = default_max_nesting;
- d->status = NULL;
+ d->status = status;
upb_pbdecoder_reset(d);
upb_bytessink_reset(&d->input_, &m->input_handler_, d);
diff --git a/upb/pb/decoder.h b/upb/pb/decoder.h
index 6fcef03..5adfba8 100644
--- a/upb/pb/decoder.h
+++ b/upb/pb/decoder.h
@@ -102,7 +102,7 @@ extern "C" {
upb_pbdecoder *upb_pbdecoder_create(upb_arena *arena,
const upb_pbdecodermethod *method,
- upb_sink output);
+ upb_sink output, upb_status *status);
const upb_pbdecodermethod *upb_pbdecoder_method(const upb_pbdecoder *d);
upb_bytessink upb_pbdecoder_input(upb_pbdecoder *d);
uint64_t upb_pbdecoder_bytesparsed(const upb_pbdecoder *d);
@@ -127,9 +127,9 @@ class upb::pb::DecoderPtr {
*
* The sink must match the given method. */
static DecoderPtr Create(Arena *arena, DecoderMethodPtr method,
- upb::Sink output) {
- return DecoderPtr(
- upb_pbdecoder_create(arena->ptr(), method.ptr(), output.sink()));
+ upb::Sink output, Status *status) {
+ return DecoderPtr(upb_pbdecoder_create(arena->ptr(), method.ptr(),
+ output.sink(), status->ptr()));
}
/* Returns the DecoderMethod this decoder is parsing from. */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback