summaryrefslogtreecommitdiff
path: root/core/upb_def.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/upb_def.c')
-rw-r--r--core/upb_def.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/upb_def.c b/core/upb_def.c
index b9402c5..c0d72db 100644
--- a/core/upb_def.c
+++ b/core/upb_def.c
@@ -1018,12 +1018,10 @@ static upb_src *upb_baredecoder_src(upb_baredecoder *d)
void upb_symtab_add_descriptorproto(upb_symtab *symtab)
{
// TODO: allow upb_strings to be static or on the stack.
- upb_string *descriptor = upb_strduplen(descriptor_pb, descriptor_pb_len);
- upb_baredecoder *decoder = upb_baredecoder_new(descriptor);
+ upb_baredecoder *decoder = upb_baredecoder_new(&descriptor_str);
upb_status status = UPB_STATUS_INIT;
upb_symtab_addfds(symtab, upb_baredecoder_src(decoder), &status);
upb_baredecoder_free(decoder);
- upb_string_unref(descriptor);
if(!upb_ok(&status)) {
// upb itself is corrupt.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback