From 7d3e2bd2c4cfd1296d1d6f996d7548de26540d41 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Fri, 15 Feb 2013 16:27:18 -0800 Subject: Sync with 8 months of Google-internal development. Many things have changed and been simplified. The memory-management story for upb_def and upb_handlers is much more robust; upb_def and upb_handlers should be fairly stable interfaces now. There is still much work to do for the runtime component (upb_sink). --- bindings/cpp/upb/pb/decoder.hpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'bindings/cpp/upb/pb/decoder.hpp') diff --git a/bindings/cpp/upb/pb/decoder.hpp b/bindings/cpp/upb/pb/decoder.hpp index 05bcb8a..950e9e2 100644 --- a/bindings/cpp/upb/pb/decoder.hpp +++ b/bindings/cpp/upb/pb/decoder.hpp @@ -22,14 +22,14 @@ #include "upb/pb/decoder.h" -#include "upb/bytestream.hpp" -#include "upb/upb.hpp" +#include "upb/bytestream.h" +#include "upb/upb.h" namespace upb { class DecoderPlan : public upb_decoderplan { public: - static DecoderPlan* New(Handlers* h, bool allow_jit) { + static DecoderPlan* New(const Handlers* h, bool allow_jit) { return static_cast(upb_decoderplan_new(h, allow_jit)); } void Unref() { upb_decoderplan_unref(this); } @@ -54,9 +54,7 @@ class Decoder : public upb_decoder { // reset to a different plan. // // Must be called before ResetInput() or Decode(). - void ResetPlan(DecoderPlan* plan, int32_t msg_offset) { - upb_decoder_resetplan(this, plan, msg_offset); - } + void ResetPlan(DecoderPlan* plan) { upb_decoder_resetplan(this, plan); } // Resets the input of the decoder. This puts it in a state where it has not // seen any data, and expects the next data to be from the beginning of a new @@ -71,7 +69,7 @@ class Decoder : public upb_decoder { // Decodes serialized data (calling Handlers as the data is parsed) until // error or EOF (see status() for details). - Success Decode() { return upb_decoder_decode(this); } + Status::Success Decode() { return upb_decoder_decode(this); } const upb::Status& status() { return static_cast(*upb_decoder_status(this)); -- cgit v1.2.3