summaryrefslogtreecommitdiff
path: root/upbc.c
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-07-06 13:34:40 -0700
committerJoshua Haberman <joshua@reverberate.org>2009-07-06 13:34:40 -0700
commit5235966ed5f369969c6ba0a558453ff22097a722 (patch)
treead3d775531b264f65e78cb964c0cae2645a44178 /upbc.c
parentdd2094537ad4316ddd42b10bca291f8d2e712de1 (diff)
Lots of documentation, cleanup, and fixed memory leaks.
Diffstat (limited to 'upbc.c')
-rw-r--r--upbc.c5
1 files changed, 3 insertions, 2 deletions
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);
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback