Skip to content

Commit

Permalink
[deps] Update is_utf8 to version 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Oct 28, 2024
1 parent 40a800e commit 2d307f0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
4 changes: 2 additions & 2 deletions deps/is_utf8/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.15)
project(is_utf8
DESCRIPTION "Fast UTF-8 Validation"
LANGUAGES CXX
VERSION 1.3.2
VERSION 1.4.1
)

include(GNUInstallDirs)
Expand All @@ -29,7 +29,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_MACOSX_RPATH OFF)

set(IS_UTF8_LIB_VERSION "1.3.2" CACHE STRING "is_utf8 library version")
set(IS_UTF8_LIB_VERSION "1.4.1" CACHE STRING "is_utf8 library version")
set(IS_UTF8_LIB_SOVERSION "1" CACHE STRING "is_utf8 library soversion")

set(IS_UTF8_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
Expand Down
4 changes: 2 additions & 2 deletions deps/is_utf8/include/is_utf8.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
// 99.99% of the inputs are valid UTF-8.
// Thus the function unconditionally scans the
// whole input.
bool is_utf8(const char *src, size_t len);
#endif // IS_UTF8
extern "C" bool is_utf8(const char *src, size_t len);
#endif // IS_UTF8
30 changes: 16 additions & 14 deletions deps/is_utf8/src/is_utf8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2568,11 +2568,11 @@ template <> struct simd8<bool> : base8<bool> {
return _mm256_set1_epi8(uint8_t(-(!!_value)));
}

is_utf8_really_inline simd8<bool>() : base8() {}
is_utf8_really_inline simd8<bool>(const __m256i _value)
is_utf8_really_inline simd8() : base8() {}
is_utf8_really_inline simd8(const __m256i _value)
: base8<bool>(_value) {}
// Splat constructor
is_utf8_really_inline simd8<bool>(bool _value) : base8<bool>(splat(_value)) {}
is_utf8_really_inline simd8(bool _value) : base8<bool>(splat(_value)) {}

is_utf8_really_inline uint32_t to_bitmask() const {
return uint32_t(_mm256_movemask_epi8(*this));
Expand Down Expand Up @@ -2998,11 +2998,11 @@ template <> struct simd16<bool> : base16<bool> {
return _mm256_set1_epi16(uint16_t(-(!!_value)));
}

is_utf8_really_inline simd16<bool>() : base16() {}
is_utf8_really_inline simd16<bool>(const __m256i _value)
is_utf8_really_inline simd16() : base16() {}
is_utf8_really_inline simd16(const __m256i _value)
: base16<bool>(_value) {}
// Splat constructor
is_utf8_really_inline simd16<bool>(bool _value)
is_utf8_really_inline simd16(bool _value)
: base16<bool>(splat(_value)) {}

is_utf8_really_inline bitmask_type to_bitmask() const {
Expand Down Expand Up @@ -3549,11 +3549,11 @@ template <> struct simd8<bool> : base8<bool> {
return _mm_set1_epi8(uint8_t(-(!!_value)));
}

is_utf8_really_inline simd8<bool>() : base8() {}
is_utf8_really_inline simd8<bool>(const __m128i _value)
is_utf8_really_inline simd8() : base8() {}
is_utf8_really_inline simd8(const __m128i _value)
: base8<bool>(_value) {}
// Splat constructor
is_utf8_really_inline simd8<bool>(bool _value) : base8<bool>(splat(_value)) {}
is_utf8_really_inline simd8(bool _value) : base8<bool>(splat(_value)) {}

is_utf8_really_inline int to_bitmask() const {
return _mm_movemask_epi8(*this);
Expand Down Expand Up @@ -4065,11 +4065,11 @@ template <> struct simd16<bool> : base16<bool> {
return _mm_set1_epi16(uint16_t(-(!!_value)));
}

is_utf8_really_inline simd16<bool>() : base16() {}
is_utf8_really_inline simd16<bool>(const __m128i _value)
is_utf8_really_inline simd16() : base16() {}
is_utf8_really_inline simd16(const __m128i _value)
: base16<bool>(_value) {}
// Splat constructor
is_utf8_really_inline simd16<bool>(bool _value)
is_utf8_really_inline simd16(bool _value)
: base16<bool>(splat(_value)) {}

is_utf8_really_inline int to_bitmask() const {
Expand Down Expand Up @@ -6748,6 +6748,8 @@ IS_UTF8_UNTARGET_REGION

IS_UTF8_POP_DISABLE_WARNINGS

bool is_utf8(const char *src, size_t len) {
return is_utf8_internals::validate_utf8(src, len);
extern "C" {
bool is_utf8(const char *src, size_t len) {
return is_utf8_internals::validate_utf8(src, len);
}
}

0 comments on commit 2d307f0

Please sign in to comment.