diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2011-08-31 20:03:59 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2011-08-31 20:03:59 -0700 |
commit | 4a8b9be46c9485a35383b52d400ba086d3f40ace (patch) | |
tree | c04b977e5db364a1c4dc53bca78ab2b1f860c5c7 /upb/pb/glue.c | |
parent | d1d126acf453608fd797ceaec73d73fa25517166 (diff) |
Header cleanup, clarify/correct comments for interfaces.
Diffstat (limited to 'upb/pb/glue.c')
-rw-r--r-- | upb/pb/glue.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/upb/pb/glue.c b/upb/pb/glue.c index 8034c54..6981aa2 100644 --- a/upb/pb/glue.c +++ b/upb/pb/glue.c @@ -19,7 +19,10 @@ void upb_strtomsg(const char *str, size_t len, void *msg, upb_msgdef *md, upb_stringsrc_reset(&strsrc, str, len); upb_decoder d; - upb_decoder_initformsgdef(&d, md); + upb_handlers *h = upb_handlers_new(); + upb_accessors_reghandlers(h, md); + upb_decoder_init(&d, h); + upb_handlers_unref(h); upb_decoder_reset(&d, upb_stringsrc_bytesrc(&strsrc), 0, UINT64_MAX, msg); upb_decoder_decode(&d, status); @@ -63,7 +66,7 @@ upb_def **upb_load_descriptor(const char *str, size_t len, int *n, upb_descreader_reghandlers(h); upb_decoder d; - upb_decoder_initforhandlers(&d, h); + upb_decoder_init(&d, h); upb_handlers_unref(h); upb_descreader r; upb_descreader_init(&r); |