Skip to content

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

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
@methane methane deleted the fix-skipitem branch May 7, 2021 02:56
@miss-islington
Copy link
Contributor

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

@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label May 7, 2021
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.

5 participants