diff options
author | Joshua Haberman <joshua@reverberate.org> | 2009-07-09 11:10:16 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2009-07-09 11:10:16 -0700 |
commit | 4d9c39b94d498e8a3ad2fb4966833092579ed038 (patch) | |
tree | 3cb44dae55cd4da6ff0f9b6e0644b0d0e9e3e803 /src | |
parent | 9bc15a1e74623753bcce0404e9cbd67f56a5e0e1 (diff) |
Make benchmark run out-of-the-box.
Diffstat (limited to 'src')
-rw-r--r-- | src/upb_context.c | 2 | ||||
-rw-r--r-- | src/upb_parse.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/upb_context.c b/src/upb_context.c index 8a9f014..76319cd 100644 --- a/src/upb_context.c +++ b/src/upb_context.c @@ -272,7 +272,7 @@ bool upb_context_addfd(struct upb_context *c, bool upb_context_parsefds(struct upb_context *c, struct upb_string *fds_str) { google_protobuf_FileDescriptorSet *fds = - upb_alloc_and_parse(c->fds_msg, fds_str, true); + upb_alloc_and_parse(c->fds_msg, fds_str, false); if(!fds) return false; if(fds->set_flags.has.file) { diff --git a/src/upb_parse.h b/src/upb_parse.h index d9db85c..4600c04 100644 --- a/src/upb_parse.h +++ b/src/upb_parse.h @@ -104,7 +104,9 @@ typedef void (*upb_submsg_end_cb)(struct upb_parse_state *s); * where user_data has as many bytes allocated as specified when initialized. */ struct upb_parse_stack_frame { size_t end_offset; /* 0 indicates that this is a group. */ +#ifndef __cplusplus /* Temporary hack since C++ doesn't support flex arrays. */ char user_data[]; +#endif }; struct upb_parse_state { |