Fix format strings on 32bit platforms#1226
Merged
bdraco merged 6 commits intoaio-libs:masterfrom Jun 28, 2025
Merged
Conversation
CodSpeed Performance ReportMerging #1226 will not alter performanceComparing Summary
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1226 +/- ##
=======================================
Coverage 98.39% 98.39%
=======================================
Files 27 27
Lines 3988 3988
Branches 735 735
=======================================
Hits 3924 3924
Misses 17 17
Partials 47 47
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
asvetlov
approved these changes
Jun 28, 2025
Member
asvetlov
left a comment
There was a problem hiding this comment.
Perfect, thanks for your efforts!
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.
What do these changes do?
This PR fixes format string specifiers in the
_md_dumpdebug function that were causing compilation failures on 32-bit platforms. The issue was that%ldformat specifiers were being used forPy_ssize_tvalues, which areinton 32-bit platforms butlong inton 64-bit platforms. All%ldspecifiers forPy_ssize_tvalues have been changed to%zd, which is the correct portable format specifier that automatically adjusts to the platform's size.Are there changes in behavior for the user?
No functional changes for end users. This fix only affects debug builds (when
MULTIDICT_DEBUG_BUILDenvironment variable is set) and allows them to compile successfully on 32-bit platforms. The_md_dumpfunction is only compiled in debug builds and is used for internal debugging purposes.Related issue number
Fixes #1225
Checklist
Note: No unit tests or documentation changes are needed for this fix as it only corrects format specifiers in a debug-only function that doesn't affect the public API or runtime behavior.