From 35e5c248bee19703b7e3c9e43d7bd8fd7aa2a79d Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Mon, 14 Jun 2010 10:47:56 -0700 Subject: Work to make upb_def consume a upb_src. --- src/upb_def.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/upb_def.h') diff --git a/src/upb_def.h b/src/upb_def.h index a571730..0b8f114 100644 --- a/src/upb_def.h +++ b/src/upb_def.h @@ -244,12 +244,15 @@ upb_def *upb_symtab_lookup(upb_symtab *s, upb_string *sym); // returned, otherwise only defs of the required type are returned. upb_def **upb_symtab_getdefs(upb_symtab *s, int *count, upb_def_type_t type); -// Adds the definitions in the given serialized descriptor to this symtab. All -// types that are referenced from desc must have previously been defined (or be -// defined in desc). desc may not attempt to define any names that are already -// defined in this symtab. Caller retains ownership of desc. status indicates -// whether the operation was successful or not, and the error message (if any). -void upb_symtab_add_desc(upb_symtab *s, upb_string *desc, upb_status *status); +// "fds" is a upb_src that will yield data from the +// google.protobuf.FileDescriptorSet message type. upb_symtab_add_fds() adds +// all the definitions from the given FileDescriptorSet and adds them to the +// symtab. status indicates whether the operation was successful or not, and +// the error message (if any). +// +// TODO: should this allow redefinition? Either is possible, but which is +// more useful? Maybe it should be an option. +void upb_symtab_addfds(upb_symtab *s, upb_src *desc, upb_status *status); /* upb_def casts **************************************************************/ -- cgit v1.2.3