Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #254 +/- ##
=======================================
Coverage 76.40% 76.40%
=======================================
Files 1 1
Lines 1102 1102
Branches 346 346
=======================================
Hits 842 842
Misses 52 52
Partials 208 208
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:
|
Change newUTF8SVpv(), newUTF8SVpvn(), and append_error() to accept const char* parameters, matching the const XML_Char* types from expat callbacks. This removes 30+ unnecessary (char*) casts that were discarding const qualifiers throughout the file. Also replace three (char*) 0 null pointer idioms with NULL and remove a redundant cast on the enc variable in XML_ParserCreate. No functional change — purely a type-correctness cleanup that lets the compiler enforce const safety. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
Rebase with requested adjustmentsBranch StatsActions performed
CI statusCI will be checked asynchronously. Automated by Kōan |
4d99126 to
a621953
Compare
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
Fix const-correctness in Expat.xs by propagating
const char *through internal helper functions.Why
Expat callbacks receive
const XML_Char *parameters, butnewUTF8SVpv(),newUTF8SVpvn(), andappend_error()took plainchar *. This forced 30+ explicit(char *)casts throughout the file, silently discarding const qualifiers. Compilers couldn't catch accidental mutation of expat-owned strings.How
newUTF8SVpv(),newUTF8SVpvn(), andappend_error()to acceptconst char *(char *)casts at call sites(char *) 0withNULL(3 occurrences)encvariable inXML_ParserCreate(char *)cast in the encoding loader (byte-level pointer arithmetic)No functional change — the generated machine code is identical.
Testing
Full
make testpasses (59 programs, 677 subtests). Clean build with zero warnings.🤖 Generated with Claude Code
Quality Report
Changes: 1 file changed, 42 insertions(+), 42 deletions(-)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline