Skip to content

ErasedPtr: drop Clone bound and allow cross-type nullptr casts#4

Merged
nunoplopes merged 4 commits intoCpp2Rust:masterfrom
lucic71:libcc2rs-improvs
Apr 19, 2026
Merged

ErasedPtr: drop Clone bound and allow cross-type nullptr casts#4
nunoplopes merged 4 commits intoCpp2Rust:masterfrom
lucic71:libcc2rs-improvs

Conversation

@lucic71
Copy link
Copy Markdown
Contributor

@lucic71 lucic71 commented Apr 16, 2026

This PR allows converting between void* and non-clonable pointer types (FILE*, for example), and fixes cross-type nullptr casts (casting a nullptr void* to any other pointer).

This is a smaller PR based of #3

@lucic71
Copy link
Copy Markdown
Contributor Author

lucic71 commented Apr 17, 2026

To implement the second part of #3, i.e. "expose translation rules function declarations to generated code to allow fn_ptr == translated_rule", this PR and #7 need to be merged

@nunoplopes nunoplopes merged commit 5ea0b1f into Cpp2Rust:master Apr 19, 2026
5 checks passed
@lucic71 lucic71 deleted the libcc2rs-improvs branch April 29, 2026 13:19
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