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. --- tests/conformance_upb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/conformance_upb.c b/tests/conformance_upb.c index f920af9..8cb42c6 100644 --- a/tests/conformance_upb.c +++ b/tests/conformance_upb.c @@ -63,8 +63,8 @@ void DoTest( switch (conformance_ConformanceRequest_payload_case(request)) { case conformance_ConformanceRequest_payload_protobuf_payload: { upb_strview payload = conformance_ConformanceRequest_protobuf_payload(request); - test_message = protobuf_test_messages_proto3_TestAllTypesProto3_parsenew( - payload, arena); + test_message = protobuf_test_messages_proto3_TestAllTypesProto3_parse( + payload.data, payload.size, arena); if (!test_message) { static const char msg[] = "Parse error"; @@ -154,8 +154,8 @@ bool DoTestIo() { exit(1); } - request = conformance_ConformanceRequest_parsenew( - upb_strview_make(serialized_input, input_size), &arena); + request = conformance_ConformanceRequest_parse(serialized_input, input_size, + &arena); response = conformance_ConformanceResponse_new(&arena); if (request) { -- cgit v1.2.3