Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.14] gh-143050: Correct PyLong_FromString() to use _PyLong_Negate() (GH-145901)#147331

Merged
vstinner merged 1 commit into
python:3.14python/cpython:3.14from
miss-islington:backport-db5936c-3.14miss-islington/cpython:backport-db5936c-3.14Copy head branch name to clipboard
Mar 31, 2026
Merged

[3.14] gh-143050: Correct PyLong_FromString() to use _PyLong_Negate() (GH-145901)#147331
vstinner merged 1 commit into
python:3.14python/cpython:3.14from
miss-islington:backport-db5936c-3.14miss-islington/cpython:backport-db5936c-3.14Copy head branch name to clipboard

Conversation

@miss-islington

@miss-islington miss-islington commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

The long_from_string_base() might return a small integer, when the
_pylong.py is used to do conversion. Hence, we must be careful here to
not smash it "small int" bit by using the _PyLong_FlipSign().
(cherry picked from commit db5936c)

Co-authored-by: Sergey B Kirpichev skirpichev@gmail.com
Co-authored-by: Victor Stinner vstinner@python.org

…ythonGH-145901)

The long_from_string_base() might return a small integer, when the
_pylong.py is used to do conversion.  Hence, we must be careful here to
not smash it "small int" bit by using the _PyLong_FlipSign().
(cherry picked from commit db5936c)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
@vstinner vstinner merged commit 25b48b8 into python:3.14 Mar 31, 2026
50 checks passed
@miss-islington miss-islington deleted the backport-db5936c-3.14 branch March 31, 2026 14:14
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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.