Merge commit '4b414d60eeaa00f6fbbbdb2f937b26601e903ee9' into chore-deps-update-utf8-range

pull/12918/head
Carlos O'Ryan 2 years ago
commit f2d99477a0
  1. 6
      third_party/utf8_range/BUILD.bazel
  2. 2
      third_party/utf8_range/utf8_validity.cc

@ -4,6 +4,12 @@
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
DEFAULT_VISIBILITY = [
"//third_party/protobuf:__subpackages__",
"//:__subpackages__",
"//util/utf8/internal:__subpackages__",
]
package(default_visibility = ["//visibility:public"])
licenses(["notice"])

@ -133,6 +133,7 @@ size_t ValidUTF8Span(const char* data, const char* end) {
return err_pos + (1 - ReturnPosition);
}
#ifdef __SSE4_1__
/* Returns the number of bytes needed to skip backwards to get to the first
byte of codepoint.
*/
@ -148,6 +149,7 @@ inline int CodepointSkipBackwards(int32_t codepoint_word) {
}
return 0;
}
#endif // __SSE4_1__
/* Skipping over ASCII as much as possible, per 8 bytes. It is intentional
as most strings to check for validity consist only of 1 byte codepoints.

Loading…
Cancel
Save