fix(lib): cast NULL in ts_subtree_children macro#5343
Merged
amaanq merged 1 commit intotree-sitter:masterfrom Feb 21, 2026
Merged
fix(lib): cast NULL in ts_subtree_children macro#5343amaanq merged 1 commit intotree-sitter:masterfrom
amaanq merged 1 commit intotree-sitter:masterfrom
Conversation
Contributor
Author
|
This looks like the hashbang situation from NixOS users. I am working on using ccgo from modernc to compile this into Go code along with the grammars. I got success in that with pretty printing the AST in a fully static Golang binary with about 4MB. That compiler found some issues dealing with this edge case. |
8862e3c to
662165b
Compare
Member
|
CI is failing across the board @lucasew |
Explicitly casting NULL to (Subtree *) in the ternary expression ensures type consistency. This resolves ambiguous type inference issues encountered by strict static analysis tools and C-to-Go transpilers (like ccgo). Signed-off-by: lucasew <lucas59356@gmail.com>
662165b to
c0d19ee
Compare
amaanq
approved these changes
Feb 21, 2026
|
Successfully created backport PR for |
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.
Explicitly casting NULL to (Subtree *) in the ternary expression ensures
type consistency. This resolves ambiguous type inference issues encountered
by strict static analysis tools and C-to-Go transpilers (like ccgo).
Signed-off-by: lucasew lucas59356@gmail.com