Skip to content

Xpwrite0 - #65

Merged
ac000 merged 2 commits into
masterfrom
xpwrite0
Oct 11, 2026
Merged

ac000 merged 2 commits into
masterfrom
xpwrite0

Conversation

@ac000

@ac000 ac000 commented Oct 11, 2026

Copy link
Copy Markdown
Owner

No description provided.

ac000 added 2 commits October 11, 2026 15:27
This will avoid the need to call lseek(2) after writing the temporary
JSON file.

Rename xwrite() to xpwrite0(), to indicate the use of pwrite(2) with an
initial 0-offset.

Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
No need to lseek after xpwrite0().

Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
Copilot AI balanced review requested due to automatic review settings October 11, 2026 14:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The offset behavior is preserved correctly across both updated call sites.

0 open findings

What changed in this PR

Replaces sequential temporary-file writes with positioned writes while preserving read offsets.

Changes:

  • Renames xwrite to xpwrite0.
  • Uses pwrite from offset zero and removes redundant initial seeks.
  • Updates related error messages.
File Description
src/​itsa.c Adds positioned full-write handling for generated JSON files.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ac000
ac000 merged commit 4db7f56 into master Oct 11, 2026
8 checks passed
@ac000
ac000 deleted the xpwrite0 branch October 11, 2026 14:32
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