diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2025-11-03 16:55:42 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-11-03 15:56:38 +0000 |
| commit | 2f9e0d355ef4db3157a401da8bf3b8da4c811d6b (patch) | |
| tree | 7bcd7cf6c28340753b2a6c575012c8ad9001f97b | |
| parent | 4740b3d7aab216e83f069c4d2f26edfa3aeb1709 (diff) | |
[ruby/json] Fix duplicate 'inline' declaration specifier
Followup: https://github.com/ruby/json/pull/889
https://github.com/ruby/json/commit/591510392a
| -rw-r--r-- | ext/json/generator/generator.c | 2 | ||||
| -rw-r--r-- | ext/json/simd/simd.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c index 56aa636ef8..8930213b93 100644 --- a/ext/json/generator/generator.c +++ b/ext/json/generator/generator.c @@ -418,7 +418,7 @@ static ALWAYS_INLINE() unsigned char sse2_next_match(search_state *search) #define TARGET_SSE2 #endif -static inline TARGET_SSE2 ALWAYS_INLINE() unsigned char search_escape_basic_sse2(search_state *search) +static TARGET_SSE2 ALWAYS_INLINE() unsigned char search_escape_basic_sse2(search_state *search) { if (RB_UNLIKELY(search->has_matches)) { // There are more matches if search->matches_mask > 0. diff --git a/ext/json/simd/simd.h b/ext/json/simd/simd.h index 194baee51c..a4f917fd0a 100644 --- a/ext/json/simd/simd.h +++ b/ext/json/simd/simd.h @@ -136,7 +136,7 @@ static inline uint8x16x4_t load_uint8x16_4(const unsigned char *table) #define _mm_cmpgt_epu8(a, b) _mm_xor_si128(_mm_cmple_epu8(a, b), _mm_set1_epi8(-1)) #define _mm_cmplt_epu8(a, b) _mm_cmpgt_epu8(b, a) -static inline TARGET_SSE2 ALWAYS_INLINE() int compute_chunk_mask_sse2(const char *ptr) +static TARGET_SSE2 ALWAYS_INLINE() int compute_chunk_mask_sse2(const char *ptr) { __m128i chunk = _mm_loadu_si128((__m128i const*)ptr); // Trick: c < 32 || c == 34 can be factored as c ^ 2 < 33 @@ -147,7 +147,7 @@ static inline TARGET_SSE2 ALWAYS_INLINE() int compute_chunk_mask_sse2(const char return _mm_movemask_epi8(needs_escape); } -static inline TARGET_SSE2 ALWAYS_INLINE() int string_scan_simd_sse2(const char **ptr, const char *end, int *mask) +static TARGET_SSE2 ALWAYS_INLINE() int string_scan_simd_sse2(const char **ptr, const char *end, int *mask) { while (*ptr + sizeof(__m128i) <= end) { int chunk_mask = compute_chunk_mask_sse2(*ptr); |
