A few more fixes.

pull/13171/head
Josh Haberman 6 years ago
parent 8980f6db5c
commit c4327e55ac
  1. 1
      upb/pb/decoder.h
  2. 2
      upb/sink.h

@ -117,6 +117,7 @@ void upb_pbdecoder_reset(upb_pbdecoder *d);
* decoded data to its output sink. */ * decoded data to its output sink. */
class upb::pb::DecoderPtr { class upb::pb::DecoderPtr {
public: public:
DecoderPtr() : ptr_(nullptr) {}
DecoderPtr(upb_pbdecoder* ptr) : ptr_(ptr) {} DecoderPtr(upb_pbdecoder* ptr) : ptr_(ptr) {}
upb_pbdecoder* ptr() { return ptr_; } upb_pbdecoder* ptr() { return ptr_; }

@ -503,7 +503,7 @@ bool upb_bufsrc_putbuf(const char *buf, size_t len, upb_bytessink sink);
namespace upb { namespace upb {
template <class T> bool PutBuffer(const T& str, BytesSink sink) { template <class T> bool PutBuffer(const T& str, BytesSink sink) {
return upb_bufsrc_putbuf(str.c_str(), str.size(), sink.sink()); return upb_bufsrc_putbuf(str.data(), str.size(), sink.sink());
} }
} }

Loading…
Cancel
Save