Attention needed from Ian McKellar and Owners Override
Daniel Thornburgh has uploaded the change for review![Open in Gerrit]()
Daniel Thornburgh would like Owners Override to review this change.
Commit message
[build] Do not assume that string_view iterator is const char*
A recent libc++ change introduced a wrapper type to explicitly break
this assumption.
Fixed: 328282937
Change-Id: Idd3b1125d41e79664ae088f352457665dae602d2
Change diff
diff --git a/tools/fidl/fidlc/src/json_writer.h b/tools/fidl/fidlc/src/json_writer.h
index 4192dbc..0d9a109 100644
--- a/tools/fidl/fidlc/src/json_writer.h
+++ b/tools/fidl/fidlc/src/json_writer.h
@@ -228,7 +228,7 @@
while (*it != '}') {
++it;
}
- std::string_view codepoint_hex(hex_begin, it - hex_begin);
+ std::string_view codepoint_hex = value.substr(hex_begin - value.begin(), it - hex_begin);
// Next, decode the code point X as an integer.
auto codepoint = decode_unicode_hex(codepoint_hex);
if (codepoint <= 0xffff) {
diff --git a/tools/fidl/fidlc/src/utils.cc b/tools/fidl/fidlc/src/utils.cc
index ed03da7..13e30f0 100644
--- a/tools/fidl/fidlc/src/utils.cc
+++ b/tools/fidl/fidlc/src/utils.cc
@@ -304,7 +304,7 @@
uint32_t decode_unicode_hex(std::string_view str) {
char* endptr;
- unsigned long codepoint = strtoul(str.begin(), &endptr, 16);
+ unsigned long codepoint = strtoul(str.data(), &endptr, 16);
ZX_ASSERT(codepoint != ULONG_MAX);
ZX_ASSERT(endptr == str.end());
return codepoint;
Change information
Files:
- M tools/fidl/fidlc/src/json_writer.h
- M tools/fidl/fidlc/src/utils.cc
Change size: XS
Delta: 2 files changed, 2 insertions(+), 2 deletions(-)
Open in GerritRelated details
Attention is currently required from:
- Ian McKellar
- Owners Override
Submit Requirements:
Code-Review
Review-Enforcement
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Idd3b1125d41e79664ae088f352457665dae602d2
Gerrit-Change-Number: 1005917
Gerrit-PatchSet: 5
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
.