Skip to content

Conversation

@Rua
Copy link
Contributor

@Rua Rua commented Dec 18, 2025

This factors out functions for two things: casts involving pointers, and null checking. In the case of == and != operators in a non-conditional context (in operators.rs), this also adds special handling for regular pointers, where only function pointers were specially handled previously. This means that

int b = ptr == NULL;

is now translated with the is_null method as well, instead of with the == operator and core::ptr::null.

@Rua Rua force-pushed the pointer-casts branch 2 times, most recently from ff423e5 to 3a55413 Compare January 8, 2026 10:38
Copy link
Contributor

@kkysen kkysen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, when you do refactoring PRs like this, can you try to split out the pure moves vs. the semantic changes more carefully/fine-grained? It makes it much harder to review when mostly moves are mixed with some other changes (although I'm not sure if there are better ways of viewing the diffs; I tried --color-moved but it doesn't really work usually).

@Rua
Copy link
Contributor Author

Rua commented Jan 19, 2026

By the way, when you do refactoring PRs like this, can you try to split out the pure moves vs. the semantic changes more carefully/fine-grained?

How is this now?

@Rua Rua requested a review from kkysen January 23, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants