diff options
Diffstat (limited to 'upb/bindings/lua')
-rw-r--r-- | upb/bindings/lua/def.c | 3 | ||||
-rw-r--r-- | upb/bindings/lua/upb/pb.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/upb/bindings/lua/def.c b/upb/bindings/lua/def.c index 3868179..a9ab9a8 100644 --- a/upb/bindings/lua/def.c +++ b/upb/bindings/lua/def.c @@ -639,8 +639,7 @@ static int lupb_symtab_add(lua_State *L) { lupb_arena_new(L); arena = lupb_arena_check(L, -1); - set = google_protobuf_FileDescriptorSet_parsenew(upb_strview_make(str, len), - arena); + set = google_protobuf_FileDescriptorSet_parse(str, len, arena); if (!set) { luaL_argerror(L, 2, "failed to parse descriptor"); diff --git a/upb/bindings/lua/upb/pb.c b/upb/bindings/lua/upb/pb.c index e60dcde..b02fa3e 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; |