8000 bpo-44946: Streamline operators and creation of ints for common case of single 'digit'. by markshannon · Pull Request #27832 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-44946: Streamline operators and creation of ints for common case of single 'digit'. #27832

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

Merged
merged 17 commits into from
Aug 25, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Edit comment
  • Loading branch information
markshannon committed Aug 25, 2021
commit 47571ffaeee4f9758876bb0de9e1e8ee594a36c7
3 changes: 1 addition & 2 deletions Objects/longobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ medium_value(PyLongObject *x)

static inline int is_medium_int(stwodigits x)
{
/* We have to take care here to make sure that we are
* comparing unsigned values. */
/* Take care that we are comparing unsigned values. */
twodigits x_plus_mask = ((twodigits)x) + PyLong_MASK;
return x_plus_mask < ((twodigits)PyLong_MASK) + PyLong_BASE;
}
Expand Down
0