From 9ea6bb467810b958c8c2fb0bcf96d0af2b243801 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Thu, 3 Jan 2019 11:16:27 -0800 Subject: Renamed upb_stringview -> upb_strview for C terseness. --- upbc/generator.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'upbc') diff --git a/upbc/generator.cc b/upbc/generator.cc index 12edc33..42e249e 100644 --- a/upbc/generator.cc +++ b/upbc/generator.cc @@ -212,7 +212,7 @@ std::string CTypeInternal(const protobuf::FieldDescriptor* field, case protobuf::FieldDescriptor::CPPTYPE_UINT64: return "uint64_t"; case protobuf::FieldDescriptor::CPPTYPE_STRING: - return "upb_stringview"; + return "upb_strview"; default: fprintf(stderr, "Unexpected type"); abort(); @@ -252,7 +252,7 @@ std::string FieldDefault(const protobuf::FieldDescriptor* field) { case protobuf::FieldDescriptor::CPPTYPE_MESSAGE: return "NULL"; case protobuf::FieldDescriptor::CPPTYPE_STRING: - return absl::Substitute("upb_stringview_make(\"$0\", strlen(\"$0\"))", + return absl::Substitute("upb_strview_make(\"$0\", strlen(\"$0\"))", absl::CEscape(field->default_value_string())); case protobuf::FieldDescriptor::CPPTYPE_INT32: return absl::StrCat(field->default_value_int32()); @@ -325,7 +325,7 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output "UPB_INLINE $0 *$0_new(upb_arena *arena) {\n" " return ($0 *)upb_msg_new(&$1, arena);\n" "}\n" - "UPB_INLINE $0 *$0_parsenew(upb_stringview buf, upb_arena *arena) {\n" + "UPB_INLINE $0 *$0_parsenew(upb_strview buf, upb_arena *arena) {\n" " $0 *ret = $0_new(arena);\n" " return (ret && upb_decode(buf, ret, &$1)) ? ret : NULL;\n" "}\n" -- cgit v1.2.3