-
Notifications
You must be signed in to change notification settings - Fork 30k
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
buffer: do not always use defaults #20054
Conversation
The Buffer#(read|write)U?Int(B|L)E functions should not use a default value. This is very likely a bug and it was never documented that way. Besides that this also improves the tests by adding more tests and by refactoring them to less code lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM I suppose, seems a bit late to be squeezing something like this into 10 though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Nit though: part of test style changes look unrelated, and I am not sure if those should be done in a semver-major commit. /cc @MylesBorins
@ChALkeR I can split the tests into a different PR if you want. But since it is work: are you fine with landing it as is? |
The Buffer#(read|write)U?Int(B|L)E functions should not use a default value. This is very likely a bug and it was never documented that way. Besides that this also improves the tests by adding more tests and by refactoring them to less code lines. PR-URL: nodejs#20054 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]>
No one complaint in the last 11 days, so I went ahead and landed it as is. Landed in 60b5b38 |
Backport of a changed test from nodejs#20054
Backport of a changed test from #20054 PR-URL: #21170 Reviewed-By: Colin Ihrig <[email protected]>
Backport of a changed test from #20054 PR-URL: #21170 Reviewed-By: Colin Ihrig <[email protected]>
The Buffer#(read|write)U?Int(B|L)E functions should not use a default
value. This is very likely a bug and it was never documented that
way.
I checked this against gzemnid and it did not show a single module using
this pattern. I personally say it is a bug if the user calls these functions
without arguments, because it is not clear what happens.
Besides that this also improves the tests by adding more tests and by
refactoring them to less code lines.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes