From 04e6acc850d68e84ed6c10e08453ccd7dc78a682 Mon Sep 17 00:00:00 2001 From: Hao Tang Date: Fri, 13 Feb 2026 12:55:29 +0800 Subject: [PATCH] fix: Rename template parameter BLOCK_SIZE to avoid macro conflict - Renamed the template parameter BLOCK_SIZE to SONIC_BLOCK_SIZE in internal/arch/common/unicode_common.h. - Updated all internal usages of this template parameter to reflect the new name. --- include/sonic/internal/arch/common/unicode_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sonic/internal/arch/common/unicode_common.h b/include/sonic/internal/arch/common/unicode_common.h index d6f57ed..e037ac3 100644 --- a/include/sonic/internal/arch/common/unicode_common.h +++ b/include/sonic/internal/arch/common/unicode_common.h @@ -266,7 +266,7 @@ sonic_force_inline bool handle_unicode_codepoint(const uint8_t **src_ptr, return offset > 0; } -template +template sonic_force_inline uint64_t GetEscaped(uint64_t &prev_escaped, uint64_t backslash) { uint64_t with_prev_backslash = backslash & ~prev_escaped; @@ -277,7 +277,7 @@ sonic_force_inline uint64_t GetEscaped(uint64_t &prev_escaped, odd_bits; // & backslash to clear escaped char uint64_t escaped_with_prev = (escaped ^ (backslash | prev_escaped)); - prev_escaped = ((escaped & backslash) >> (BLOCK_SIZE - 1)) & 0x1ULL; + prev_escaped = ((escaped & backslash) >> (SONIC_BLOCK_SIZE - 1)) & 0x1ULL; return escaped_with_prev; }