summaryrefslogtreecommitdiff
path: root/upb/bindings
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2019-02-01 16:34:52 -0800
committerJosh Haberman <jhaberman@gmail.com>2019-02-01 16:34:52 -0800
commit32e3f394b42cff2b94c5ef84cb31009ce33c864f (patch)
tree00d782daf791f909613a7ec8f267dbd06dd0bfe4 /upb/bindings
parent2b62fbce6734eb672ae6ff6fcf258bfff4267ae8 (diff)
A few small API tweaks.
- Foo_parsenew() -> Foo_parse(). - parse function takes plain (const char*, size_t) instead of upb_strview. The latter is mainly useful for strings inside message objects.
Diffstat (limited to 'upb/bindings')
-rw-r--r--upb/bindings/lua/upb/pb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/upb/bindings/lua/upb/pb.c b/upb/bindings/lua/upb/pb.c
index b5284df..824ac13 100644
--- a/upb/bindings/lua/upb/pb.c
+++ b/upb/bindings/lua/upb/pb.c
@@ -16,9 +16,8 @@ static int lupb_pb_decode(lua_State *L) {
const upb_msglayout *layout;
upb_msg *msg = lupb_msg_checkmsg2(L, 1, &layout);
const char *pb = lua_tolstring(L, 2, &len);
- upb_strview buf = upb_strview_make(pb, len);
- upb_decode(buf, msg, layout);
+ upb_decode(pb, len, msg, layout);
/* TODO(haberman): check for error. */
return 0;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback