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

bpo-38094: Remove unneeded assignment in PyBytes_Concat() #15274

Merged
merged 1 commit into from
Sep 10, 2019

Conversation

sir-sigurd
Copy link
Contributor

@sir-sigurd sir-sigurd commented Aug 14, 2019

It looks unneeded since its introduction in 161d695

https://bugs.python.org/issue38094

It looks unneeded since its introduction in
161d695
Copy link
Contributor

@epicfaace epicfaace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it used here:

if (oldsize > PY_SSIZE_T_MAX - wb.len) {

@sir-sigurd
Copy link
Contributor Author

When wb.len is used it's set by PyObject_GetBuffer().

@gpshead gpshead changed the title Remove unneeded assignment in PyBytes_Concat() bpo-38094: Remove unneeded assignment in PyBytes_Concat() Sep 10, 2019
@gpshead
Copy link
Member

gpshead commented Sep 10, 2019

closing and reopening to re-trigger bedevere

@gpshead gpshead closed this Sep 10, 2019
@gpshead gpshead reopened this Sep 10, 2019
@gpshead gpshead self-assigned this Sep 10, 2019
@gpshead gpshead merged commit afdeb18 into python:master Sep 10, 2019
@miss-islington
Copy link
Contributor

Thanks @sir-sigurd for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 10, 2019
The `wb.len = -1` assignment is unneeded since its introduction in 161d695 as `PyObject_GetBuffer` always fills it in.
(cherry picked from commit afdeb18)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
@bedevere-bot
Copy link

GH-15886 is a backport of this pull request to the 3.8 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.8 only security fixes label Sep 10, 2019
@gpshead gpshead added the needs backport to 3.8 only security fixes label Sep 10, 2019
@miss-islington
Copy link
Contributor

Thanks @sir-sigurd for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 10, 2019
The `wb.len = -1` assignment is unneeded since its introduction in 161d695 as `PyObject_GetBuffer` always fills it in.
(cherry picked from commit afdeb18)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
@bedevere-bot
Copy link

GH-15887 is a backport of this pull request to the 3.8 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.8 only security fixes label Sep 10, 2019
@sir-sigurd sir-sigurd deleted the bytes-concat-len-1 branch September 10, 2019 16:25
miss-islington added a commit that referenced this pull request Sep 10, 2019
The `wb.len = -1` assignment is unneeded since its introduction in 161d695 as `PyObject_GetBuffer` always fills it in.
(cherry picked from commit afdeb18)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request Jul 20, 2020
The `wb.len = -1` assignment is unneeded since its introduction in 161d695 as `PyObject_GetBuffer` always fills it in.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants