summaryrefslogtreecommitdiff
path: root/upbc
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2019-01-03 11:16:27 -0800
committerJosh Haberman <jhaberman@gmail.com>2019-01-03 11:16:27 -0800
commit9ea6bb467810b958c8c2fb0bcf96d0af2b243801 (patch)
treec1ec711ac5f20b8e7b7c320b4c0353e2db62feca /upbc
parentaac4d034205d76bb2d7e401fce865919cbf14818 (diff)
Renamed upb_stringview -> upb_strview for C terseness.
Diffstat (limited to 'upbc')
-rw-r--r--upbc/generator.cc6
1 files changed, 3 insertions, 3 deletions
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"
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback