From 32e3f394b42cff2b94c5ef84cb31009ce33c864f Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Fri, 1 Feb 2019 16:34:52 -0800 Subject: 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. --- upb/bindings/lua/upb/pb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'upb/bindings') 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; -- cgit v1.2.3