diff options
author | Josh Haberman <haberman@google.com> | 2013-02-15 16:27:18 -0800 |
---|---|---|
committer | Josh Haberman <haberman@google.com> | 2013-02-15 16:27:18 -0800 |
commit | 7d3e2bd2c4cfd1296d1d6f996d7548de26540d41 (patch) | |
tree | b4b35967b3322c65cfb1a32220e8718de09d85fc /bindings/cpp/upb/pb/decoder.hpp | |
parent | ea198bdcf947ba4bd51474bdd4f7b82b5e4cf41d (diff) |
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).
Diffstat (limited to 'bindings/cpp/upb/pb/decoder.hpp')
-rw-r--r-- | bindings/cpp/upb/pb/decoder.hpp | 12 |
1 files changed, 5 insertions, 7 deletions
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<DecoderPlan*>(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<const upb::Status&>(*upb_decoder_status(this)); |