From 1b9d37a00ebae8b59773c8501d8712e1c3335302 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 1 Jul 2017 15:15:52 -0700 Subject: Start migrating upb_msglayout to be suitable for generated code. This involves: - remove upb_msglayout -> upb_msgfactory dependency. - remove upb_msglayout -> upb_msgdef dependency (in progress). - make upb_msglayout use a representation that can be statically initialized by generated code. The goal here is that upb_msglayout becomes a kind of "descriptor lite": it contains enough data to parser and serialize protobufs and manipulate a upb_msg in memory, while being far smaller and simpler than a full descriptor. It also does not include field names, which can be a benefit for applications that do not want to leak field names. Generated code can then create a upb_msglayout, and do most things without ever needing to construct full descriptors/defs if they don't want to. --- upb/bindings/lua/upb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'upb/bindings/lua/upb.h') diff --git a/upb/bindings/lua/upb.h b/upb/bindings/lua/upb.h index 88a201c..982ae57 100644 --- a/upb/bindings/lua/upb.h +++ b/upb/bindings/lua/upb.h @@ -135,6 +135,7 @@ const upb_msg *lupb_msg_checkmsg(lua_State *L, int narg, const lupb_msgclass *lupb_msgclass_check(lua_State *L, int narg); const upb_msglayout *lupb_msgclass_getlayout(lua_State *L, int narg); const upb_handlers *lupb_msgclass_getmergehandlers(lua_State *L, int narg); +upb_msgfactory *lupb_msgclass_getfactory(const lupb_msgclass *lmsgclass); void lupb_msg_registertypes(lua_State *L); #endif /* UPB_LUA_UPB_H_ */ -- cgit v1.2.3