summaryrefslogtreecommitdiff
path: root/upb/bindings/lua/upb.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2018-08-12 19:23:26 -0700
committerJoshua Haberman <jhaberman@gmail.com>2018-08-12 19:23:26 -0700
commitc8f6a27e6b27ed5d51cf6c8da5ec080b9952fa99 (patch)
tree8d9e160dcb6f52f530a00868f342ab08121d1684 /upb/bindings/lua/upb.h
parentb0a6602fc8fddf71ac959d43b4cd82707e6235b9 (diff)
Enforced that upb_msg lives in an Arena only, and other simplifying.
upb_msg was trying to be general enough that it could either live in an arena or be allocated with malloc()/free(). This was too much complexity for too little benefit. We should commit to just saying that upb_msg is arena-only. I also ripped out the code to glue upb_msg to the existing handlers-based encoder/decoder. upb_msg has its own, small, simple encoder/decoder. I'm trying to whittle down upb_msg to a small and simple core. I updated the Lua extension for these changes. Lua needs some more work to properly create arenas per message. For now I just created a single global arena.
Diffstat (limited to 'upb/bindings/lua/upb.h')
-rw-r--r--upb/bindings/lua/upb.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/upb/bindings/lua/upb.h b/upb/bindings/lua/upb.h
index ea2910a..52bc5a2 100644
--- a/upb/bindings/lua/upb.h
+++ b/upb/bindings/lua/upb.h
@@ -131,11 +131,12 @@ int lupb_arena_new(lua_State *L);
int lupb_msg_pushref(lua_State *L, int msgclass, void *msg);
const upb_msg *lupb_msg_checkmsg(lua_State *L, int narg,
const lupb_msgclass *lmsgclass);
+upb_msg *lupb_msg_checkmsg2(lua_State *L, int narg,
+ const upb_msglayout **layout);
const lupb_msgclass *lupb_msgclass_check(lua_State *L, int narg);
const upb_msglayout *lupb_msgclass_getlayout(lua_State *L, int narg);
const upb_msgdef *lupb_msgclass_getmsgdef(const lupb_msgclass *lmsgclass);
-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);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback