Skip to content

Emit zeroed() for libc structs without default#84

Merged
nunoplopes merged 9 commits into
Cpp2Rust:masterfrom
lucic71:libc-zeroed
May 13, 2026
Merged

Emit zeroed() for libc structs without default#84
nunoplopes merged 9 commits into
Cpp2Rust:masterfrom
lucic71:libc-zeroed

Conversation

@lucic71
Copy link
Copy Markdown
Contributor

@lucic71 lucic71 commented May 12, 2026

No description provided.

@lucic71 lucic71 marked this pull request as draft May 12, 2026 15:30
lucic71 added 6 commits May 12, 2026 16:37
This reverts commit 9cbd9df.
One of the fields of sockaddr_in is u8 on Linux and u16 on macOS. We
emit integer literals suffix when initializing each field. On Linux we
emit 2_u8, and on macOS we emit 2_u16 for example. To fix this we should
not emit integer literal suffix at all.
@lucic71 lucic71 marked this pull request as ready for review May 13, 2026 09:12
@nunoplopes nunoplopes merged commit 2ef0a51 into Cpp2Rust:master May 13, 2026
9 checks passed
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