Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: note that buf.buffer's contents might differ #29651

Closed
wants to merge 1 commit into from

Conversation

@strugee
Copy link
Contributor

strugee commented Sep 22, 2019

This bit me in a personal project since I had no reason to read the buf.byteOffset docs, so point readers there explicitly.

Checklist

- [ ] make -j4 test (UNIX), or vcbuild test (Windows) passes
- [ ] tests and/or benchmarks are included

@strugee strugee force-pushed the strugee:patch-2 branch from 0043ac8 to 5f0bd23 Sep 22, 2019
This bit me in a personal project since I had no reason to read the
`buf.byteOffset` docs, so point readers there explicitly.
@strugee strugee force-pushed the strugee:patch-2 branch from 5f0bd23 to e9cf657 Sep 22, 2019
@@ -1025,6 +1025,9 @@ console.log(buf.toString('ascii'));
* {ArrayBuffer} The underlying `ArrayBuffer` object based on
which this `Buffer` object is created.

This `ArrayBuffer` is not guaranteed to correspond exactly to the original
`Buffer`. See the notes on `buf.byteOffset` for details.

This comment has been minimized.

Copy link
@trivikr

trivikr Sep 22, 2019

Member
Suggested change
`Buffer`. See the notes on `buf.byteOffset` for details.
`Buffer`. See the notes on [`buf.byteOffset`][] for details.

Add the following at the bottom:

[`buf.byteOffset`]: #buffer_buf_byteoffset

This comment has been minimized.

Copy link
@jasnell

jasnell Sep 25, 2019

Member

I think a better approach is to say that the Buffer is a view over a subset of the ArrayBuffer. It will correspond to that subset only starting at the byteOffset.

@Trott

This comment has been minimized.

Copy link
Member

Trott commented Sep 24, 2019

@Trott

This comment has been minimized.

Copy link
Member

Trott commented Sep 29, 2019

This seems to have stalled, so I'm going to close it. If you plan on working revising this to get it landed, please re-open or leave a comment. Thanks!

@Trott Trott closed this Sep 29, 2019
@Trott

This comment has been minimized.

Copy link
Member

Trott commented Sep 29, 2019

Actually, I take it back. Re-opening....

@Trott Trott reopened this Sep 29, 2019
addaleax added a commit that referenced this pull request Nov 30, 2019
This bit me in a personal project since I had no reason to read the
`buf.byteOffset` docs, so point readers there explicitly.

PR-URL: #29651
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@addaleax

This comment has been minimized.

Copy link
Member

addaleax commented Nov 30, 2019

Landed in 5833cfd

@addaleax addaleax closed this Nov 30, 2019
addaleax added a commit that referenced this pull request Nov 30, 2019
This bit me in a personal project since I had no reason to read the
`buf.byteOffset` docs, so point readers there explicitly.

PR-URL: #29651
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@BridgeAR BridgeAR mentioned this pull request Dec 3, 2019
targos added a commit that referenced this pull request Dec 5, 2019
This bit me in a personal project since I had no reason to read the
`buf.byteOffset` docs, so point readers there explicitly.

PR-URL: #29651
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Sebastien-Ahkrin added a commit to Sebastien-Ahkrin/node that referenced this pull request Dec 5, 2019
This bit me in a personal project since I had no reason to read the
`buf.byteOffset` docs, so point readers there explicitly.

PR-URL: nodejs#29651
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@BethGriggs BethGriggs mentioned this pull request Dec 9, 2019
Sebastien-Ahkrin added a commit to Sebastien-Ahkrin/node that referenced this pull request Dec 11, 2019
This bit me in a personal project since I had no reason to read the
`buf.byteOffset` docs, so point readers there explicitly.

PR-URL: nodejs#29651
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins added a commit that referenced this pull request Dec 17, 2019
This bit me in a personal project since I had no reason to read the
`buf.byteOffset` docs, so point readers there explicitly.

PR-URL: #29651
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@BethGriggs BethGriggs mentioned this pull request Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.