Skip to content

Honor file_identifier and root_type - #377

Open
kraln wants to merge 1 commit into
planus-org:mainfrom
kraln:pr-file-identifier
Open

Honor file_identifier and root_type#377
kraln wants to merge 1 commit into
planus-org:mainfrom
kraln:pr-file-identifier

Conversation

@kraln

@kraln kraln commented Jul 28, 2026

Copy link
Copy Markdown

A schema's file_identifier is attached to its root_type table and exposed as an IDENTIFIER associated constant, alongside a new planus::buffer_has_identifier helper. Builder::finish is also fixed to write the identifier into bytes 4..8 after the root offset (the two were previously swapped, on an untested path) so identifier-bearing buffers match the official implementation.

Addresses #141 and #55

Split out of !366

Checklist

  • Updated CHANGELOG.md with relevant changes
  • Added tests for any new/fixed functionality
  • Added/updated documentation for new/changed code
  • Checked that README.md still makes sense (and updated it if necessary)

A schema's file_identifier is attached to its root_type table and exposed as an
IDENTIFIER associated constant, alongside a new planus::buffer_has_identifier
helper. Builder::finish is also fixed to write the identifier into bytes 4..8
after the root offset (the two were previously swapped, on an untested path) so
identifier-bearing buffers match the official implementation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant