fix: Rename template parameter BLOCK_SIZE to avoid macro conflict#127
Merged
liuq19 merged 1 commit intobytedance:masterfrom Feb 13, 2026
Merged
fix: Rename template parameter BLOCK_SIZE to avoid macro conflict#127liuq19 merged 1 commit intobytedance:masterfrom
liuq19 merged 1 commit intobytedance:masterfrom
Conversation
- 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.
liuq19
approved these changes
Feb 13, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #127 +/- ##
==========================================
+ Coverage 74.79% 76.04% +1.25%
==========================================
Files 21 22 +1
Lines 2436 2680 +244
Branches 667 750 +83
==========================================
+ Hits 1822 2038 +216
+ Misses 297 106 -191
- Partials 317 536 +219 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The template parameter
BLOCK_SIZEused ininternal/arch/common/unicode_common.hconflicts with a common macro of the same name defined in system headers like<linux/fs.h>(on Linux/Android). This causes compilation errors when<sonic/sonic.h>is included after such headers.This pull request renames the template parameter to prevent this macro pollution, improving the library's robustness and compatibility in various build environments.
Changes
BLOCK_SIZEin internal/arch/common/unicode_common.h.Reproduce
The fix has been verified by building the following minimal reproducible example, which now compiles successfully:
The compilation error message is shown below: