From 5235966ed5f369969c6ba0a558453ff22097a722 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Mon, 6 Jul 2009 13:34:40 -0700 Subject: Lots of documentation, cleanup, and fixed memory leaks. --- upbc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'upbc.c') diff --git a/upbc.c b/upbc.c index 7b649af..4177576 100644 --- a/upbc.c +++ b/upbc.c @@ -65,7 +65,7 @@ static void write_header(struct upb_symtab_entry entries[], int num_entries, struct upb_string enum_val_prefix = upb_strdup(entry->e.key); enum_val_prefix.byte_len = memrchr(enum_val_prefix.ptr, - UPB_CONTEXT_SEPARATOR, + UPB_SYMBOL_SEPARATOR, enum_val_prefix.byte_len); enum_val_prefix.byte_len++; to_preproc(enum_val_prefix); @@ -135,7 +135,7 @@ static void write_header(struct upb_symtab_entry entries[], int num_entries, /* Submessages get special treatment, since we have to use the message * name directly. */ struct upb_string type_name_ref = *fd->type_name; - if(type_name_ref.ptr[0] == UPB_CONTEXT_SEPARATOR) { + if(type_name_ref.ptr[0] == UPB_SYMBOL_SEPARATOR) { /* Omit leading '.'. */ type_name_ref.ptr++; type_name_ref.byte_len--; @@ -207,5 +207,6 @@ int main() struct upb_string name = UPB_STRLIT("descriptor.proto"); write_header(entries, symcount, name, stdout); upb_context_free(&c); + upb_strfree(fds); } -- cgit v1.2.3