From ac2689cec721eb94b49dfbfed310e2e0e3bdfa2b Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Thu, 21 Apr 2016 16:26:52 -0700 Subject: Put oneofs in the same table as fields. (#60) * Put oneofs in the same table as fields. Oneofs and fields are not allowed to have names that conflict, so we might as well put them all in the same table. This also allows an efficient operation that looks for both fields and oneofs in a single lookup. Added support for OneofDef to Lua to allow testing of this. * Addressed PR comments. --- upb/bindings/lua/upb.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'upb/bindings/lua/upb.h') diff --git a/upb/bindings/lua/upb.h b/upb/bindings/lua/upb.h index 6957ec2..f37ed9a 100644 --- a/upb/bindings/lua/upb.h +++ b/upb/bindings/lua/upb.h @@ -94,6 +94,8 @@ bool lupb_def_pushwrapper(lua_State *L, const upb_def *def, const void *ref_donor); void lupb_def_pushnewrapper(lua_State *L, const upb_def *def, const void *ref_donor); +void lupb_msgdef_pushwrapper(lua_State *L, const upb_msgdef *m, + const void *ref_donor); void lupb_symtab_pushwrapper(lua_State *L, const upb_symtab *s, const void *ref_donor); void lupb_symtab_pushnewrapper(lua_State *L, const upb_symtab *s, -- cgit v1.2.3