Skip to content

Make sure an ArrayBuffer never has a NULL data pointer#1437

Merged
saghul merged 1 commit intomasterfrom
uint8array-not-null
Apr 1, 2026
Merged

Make sure an ArrayBuffer never has a NULL data pointer#1437
saghul merged 1 commit intomasterfrom
uint8array-not-null

Conversation

@saghul
Copy link
Copy Markdown
Contributor

@saghul saghul commented Apr 1, 2026

This reverts 6734b76.

I was wrong on the direction of that fix. The reulting API is very
un-ergonomic: one needs to check for exceptions in case of a NULL return
since it would've been legit, and creaes an asymetry with string APIs
that return a pointer, but NULL on error.

This reverts 6734b76.

I was wrong on the direction of that fix. The reulting API is very
un-ergonomic: one needs to check for exceptions in case of a NULL return
since it would've been legit, and creaes an asymetry with string APIs
that return a pointer, but NULL on error.
@saghul
Copy link
Copy Markdown
Contributor Author

saghul commented Apr 1, 2026

@bnoordhuis PTAL. I had tunnel vision here, and only realized this was wrong after trying to make it work in txiki.js: saghul/txiki.js@9f0dda2 yeah, bad idea...

@saghul saghul merged commit f4b23b2 into master Apr 1, 2026
122 checks passed
@saghul saghul deleted the uint8array-not-null branch April 1, 2026 19: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