diff options
author | Joshua Haberman <joshua@reverberate.org> | 2009-07-06 13:34:40 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2009-07-06 13:34:40 -0700 |
commit | 5235966ed5f369969c6ba0a558453ff22097a722 (patch) | |
tree | ad3d775531b264f65e78cb964c0cae2645a44178 /upbc.c | |
parent | dd2094537ad4316ddd42b10bca291f8d2e712de1 (diff) |
Lots of documentation, cleanup, and fixed memory leaks.
Diffstat (limited to 'upbc.c')
-rw-r--r-- | upbc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); } |