summaryrefslogtreecommitdiff
path: root/upb/def.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2019-01-23 12:58:20 -0800
committerJoshua Haberman <jhaberman@gmail.com>2019-01-23 12:58:20 -0800
commit315c167bedbe33386e0bffd537d1f28eb259c986 (patch)
tree3539617796376e261a2ec6e619b18bc28a95cc4c /upb/def.h
parent04923fc26e1ca9f935fe10fb0de0fa932f7aa8b4 (diff)
Some more fixes for PHP.
Diffstat (limited to 'upb/def.h')
-rw-r--r--upb/def.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/upb/def.h b/upb/def.h
index 2c336c5..9a722f3 100644
--- a/upb/def.h
+++ b/upb/def.h
@@ -818,6 +818,7 @@ const upb_msgdef *upb_symtab_lookupmsg(const upb_symtab *s, const char *sym);
const upb_msgdef *upb_symtab_lookupmsg2(
const upb_symtab *s, const char *sym, size_t len);
const upb_enumdef *upb_symtab_lookupenum(const upb_symtab *s, const char *sym);
+const upb_filedef *upb_symtab_lookupfile(const upb_symtab *s, const char *name);
int upb_symtab_filecount(const upb_symtab *s);
const upb_filedef *upb_symtab_addfile(
upb_symtab *s, const google_protobuf_FileDescriptorProto *file,
@@ -850,10 +851,14 @@ class upb::SymbolTable {
return MessageDefPtr(upb_symtab_lookupmsg(ptr_.get(), sym));
}
- const EnumDefPtr LookupEnum(const char *sym) const {
+ EnumDefPtr LookupEnum(const char *sym) const {
return EnumDefPtr(upb_symtab_lookupenum(ptr_.get(), sym));
}
+ FileDefPtr LookupFile(const char *name) const {
+ return FileDefPtr(upb_symtab_lookupfile(ptr_.get(), name));
+ }
+
/* TODO: iteration? */
/* Adds the given serialized FileDescriptorProto to the pool. */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback