Skip to content

[SDK V2] Remove const from BytesView.data in JS binding - #949

Merged
baijumeswani merged 1 commit into
mainfrom
skottmckay/FixJS_const_cast
Aug 4, 2026
Merged

[SDK V2] Remove const from BytesView.data in JS binding#949
baijumeswani merged 1 commit into
mainfrom
skottmckay/FixJS_const_cast

Conversation

@skottmckay

Copy link
Copy Markdown
Collaborator

It's populated with non-const values, and we were const_cast'ing to use the value.

Also move the definition up as it was in the middle of the ParseBytesValue function's documentation

…ues, and we were const_casting to use the value.
Copilot AI balanced review requested due to automatic review settings August 4, 2026 05:37
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
foundry-local Ready Ready Preview Aug 4, 2026 5:37am

Request Review

Copilot AI left a comment

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.

Pull request overview

Removes unnecessary const-casts from JS byte-buffer handling and correctly positions BytesView outside the parser documentation.

Changes:

  • Makes BytesView.data mutable.
  • Passes native buffer pointers directly to owning item factories.
  • Moves BytesView before ParseBytesValue documentation.

@baijumeswani
baijumeswani merged commit b8de1db into main Aug 4, 2026
51 checks passed
@baijumeswani
baijumeswani deleted the skottmckay/FixJS_const_cast branch August 4, 2026 15:06
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.

3 participants