Skip to content

Add fwrite in libcc2rs to allow taking its address#95

Merged
nunoplopes merged 4 commits into
Cpp2Rust:masterfrom
lucic71:fwrite
May 14, 2026
Merged

Add fwrite in libcc2rs to allow taking its address#95
nunoplopes merged 4 commits into
Cpp2Rust:masterfrom
lucic71:fwrite

Conversation

@lucic71
Copy link
Copy Markdown
Contributor

@lucic71 lucic71 commented May 13, 2026

No description provided.

Comment thread libcc2rs/src/io.rs Outdated

for b in buffer.iter_mut().take(to_fill) {
*b = src.read();
src = src.offset(1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

src += 1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment thread libcc2rs/src/io.rs Outdated
written_bytes += off;
}

std::io::Write::flush(&mut writer).expect("flush failed");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think fwrite flushes the stream

Copy link
Copy Markdown
Contributor Author

@lucic71 lucic71 May 14, 2026

Choose a reason for hiding this comment

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

I deleted the flush

@nunoplopes nunoplopes merged commit c2f513a into Cpp2Rust:master May 14, 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