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-40943: Fix skipitem() didn't raise SystemError #25937

Merged
merged 2 commits into from May 7, 2021

Conversation

methane
Copy link
Member

@methane methane commented May 6, 2021

convertitem() raises SystemError when '#' is used without PY_SSIZE_T_CLEAN defined.
skipitem() should do it too.

https://bugs.python.org/issue40943

convertitem() raises SystemError when # is used PY_SSIZE_T_CLEAN.
skipitem() should too.
return NULL;
}
(void) va_arg(*p_va, int *);
PyErr_SetString(PyExc_SystemError,
Copy link
Member

@serhiy-storchaka serhiy-storchaka May 6, 2021

Choose a reason for hiding this comment

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

I would rewrite this code in the form:

if (!(flags & FLAG_SIZE_T)) {
    ...
}
(void) va_arg(*p_va, Py_ssize_t *);

@methane methane merged commit 4ebf4a6 into python:main May 7, 2021
10 of 11 checks passed
@methane methane deleted the fix-skipitem branch May 7, 2021
@miss-islington
Copy link
Contributor

miss-islington commented May 7, 2021

Thanks @methane for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒🤖

@bedevere-bot
Copy link

bedevere-bot commented May 7, 2021

GH-25961 is a backport of this pull request to the 3.10 branch.

miss-islington added a commit that referenced this pull request May 7, 2021
`convertitem()` raises `SystemError` when 'GH-' is used without `PY_SSIZE_T_CLEAN`.
This commit makes `skipitem()` raise it too.
(cherry picked from commit 4ebf4a6)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants