KEMBAR78
[3.11] gh-100637: Fix int and bool __sizeof__ calculation to include the 1 element ob_digit array for 0 and False (GH-100663) by miss-islington · Pull Request #100717 · python/cpython · GitHub
Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jan 3, 2023

Fixes behaviour where int (and subtypes like bool) sizeof under-reports true size as it did not take into account the size 1 ob_digit array for the zero int.

(cherry picked from commit d7e7f79)

Co-authored-by: Ionite dev@ionite.io
Co-authored-by: Mark Dickinson dickinsm@gmail.com

…he 1 element ob_digit array for 0 and False (pythonGH-100663)

Fixes behaviour where int (and subtypes like bool) __sizeof__ under-reports true size as it did not take into account the size 1 `ob_digit` array for the zero int.

(cherry picked from commit d7e7f79)

Co-authored-by: Ionite <dev@ionite.io>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants