Commit 53435df5 authored by Joshua Haberman's avatar Joshua Haberman

Merge pull request #716 from haberman/fixruby

Fixed several Ruby conformance test cases through upb update.
parents 2093749c 5bdf4a42
JsonInput.HelloWorld.JsonOutput JsonInput.HelloWorld.JsonOutput
JsonInput.HelloWorld.ProtobufOutput JsonInput.HelloWorld.ProtobufOutput
ProtobufInput.PrematureEofBeforeUnknownValue.DOUBLE
ProtobufInput.PrematureEofBeforeUnknownValue.FIXED32
ProtobufInput.PrematureEofBeforeUnknownValue.FIXED64
ProtobufInput.PrematureEofBeforeUnknownValue.FLOAT
ProtobufInput.PrematureEofBeforeUnknownValue.SFIXED32
ProtobufInput.PrematureEofBeforeUnknownValue.SFIXED64
ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.BYTES
ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.MESSAGE
ProtobufInput.PrematureEofInDelimitedDataForUnknownValue.STRING
ProtobufInput.PrematureEofInsideUnknownValue.DOUBLE
ProtobufInput.PrematureEofInsideUnknownValue.FIXED32
ProtobufInput.PrematureEofInsideUnknownValue.FIXED64
ProtobufInput.PrematureEofInsideUnknownValue.FLOAT
ProtobufInput.PrematureEofInsideUnknownValue.SFIXED32
ProtobufInput.PrematureEofInsideUnknownValue.SFIXED64
This diff is collapsed.
...@@ -5635,7 +5635,7 @@ UPB_INLINE bool upb_bufsrc_putbuf(const char *buf, size_t len, ...@@ -5635,7 +5635,7 @@ UPB_INLINE bool upb_bufsrc_putbuf(const char *buf, size_t len,
upb_bufhandle_setbuf(&handle, buf, 0); upb_bufhandle_setbuf(&handle, buf, 0);
ret = upb_bytessink_start(sink, len, &subc); ret = upb_bytessink_start(sink, len, &subc);
if (ret && len != 0) { if (ret && len != 0) {
ret = (upb_bytessink_putbuf(sink, subc, buf, len, &handle) == len); ret = (upb_bytessink_putbuf(sink, subc, buf, len, &handle) >= len);
} }
if (ret) { if (ret) {
ret = upb_bytessink_end(sink); ret = upb_bytessink_end(sink);
...@@ -7123,7 +7123,7 @@ class upb::pb::DecoderMethod { ...@@ -7123,7 +7123,7 @@ class upb::pb::DecoderMethod {
* constructed. This hint may be an overestimate for some build configurations. * constructed. This hint may be an overestimate for some build configurations.
* But if the decoder library is upgraded without recompiling the application, * But if the decoder library is upgraded without recompiling the application,
* it may be an underestimate. */ * it may be an underestimate. */
#define UPB_PB_DECODER_SIZE 4400 #define UPB_PB_DECODER_SIZE 4408
#ifdef __cplusplus #ifdef __cplusplus
...@@ -7548,6 +7548,12 @@ struct upb_pbdecoder { ...@@ -7548,6 +7548,12 @@ struct upb_pbdecoder {
char residual[12]; char residual[12];
char *residual_end; char *residual_end;
/* Bytes of data that should be discarded from the input beore we start
* parsing again. We set this when we internally determine that we can
* safely skip the next N bytes, but this region extends past the current
* user buffer. */
size_t skip;
/* Stores the user buffer passed to our decode function. */ /* Stores the user buffer passed to our decode function. */
const char *buf_param; const char *buf_param;
size_t size_param; size_t size_param;
...@@ -7590,6 +7596,7 @@ void upb_pbdecoder_seterr(upb_pbdecoder *d, const char *msg); ...@@ -7590,6 +7596,7 @@ void upb_pbdecoder_seterr(upb_pbdecoder *d, const char *msg);
/* Error messages that are shared between the bytecode and JIT decoders. */ /* Error messages that are shared between the bytecode and JIT decoders. */
extern const char *kPbDecoderStackOverflow; extern const char *kPbDecoderStackOverflow;
extern const char *kPbDecoderSubmessageTooLong;
/* Access to decoderplan members needed by the decoder. */ /* Access to decoderplan members needed by the decoder. */
const char *upb_pbdecoder_getopname(unsigned int op); const char *upb_pbdecoder_getopname(unsigned int op);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment