From d16038073629b3f89acabfbd2f2d9911b2a771d4 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 27 Nov 2009 14:21:19 -0800 Subject: Update upbc to use self-describing upb_msg instead of void*. --- src/upb_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/upb_context.c') diff --git a/src/upb_context.c b/src/upb_context.c index f30c6da..6772280 100644 --- a/src/upb_context.c +++ b/src/upb_context.c @@ -44,7 +44,7 @@ struct upb_context *upb_context_new() struct upb_string name = UPB_STRLIT("google.protobuf.FileDescriptorSet"); struct upb_symtab_entry *e = upb_strtable_lookup(&c->psymtab, &name); assert(e); - c->fds_msg = e->ref.msg; + c->fds_msgdef = e->ref.msg; c->fds_size = 16; c->fds_len = 0; c->fds = malloc(sizeof(*c->fds)); @@ -349,7 +349,7 @@ void upb_context_addfds(struct upb_context *c, void upb_context_parsefds(struct upb_context *c, struct upb_string *fds_str, struct upb_status *status) { - struct upb_msg *fds = upb_msg_new(c->fds_msg); + struct upb_msg *fds = upb_msg_new(c->fds_msgdef); upb_msg_parsestr(fds, fds_str->ptr, fds_str->byte_len, status); if(!upb_ok(status)) return; upb_context_addfds(c, (google_protobuf_FileDescriptorSet*)fds, status); -- cgit v1.2.3