Skip to content

[3.11] gh-100637: Fix int and bool __sizeof__ calculation to include the 1 element ob_digit array for 0 and False (GH-100663)#100717

Merged
mdickinson merged 1 commit intopython:3.11from
miss-islington:backport-d7e7f79-3.11
Jan 3, 2023
Merged

[3.11] gh-100637: Fix int and bool __sizeof__ calculation to include the 1 element ob_digit array for 0 and False (GH-100663)#100717
mdickinson merged 1 commit intopython:3.11from
miss-islington:backport-d7e7f79-3.11

Conversation

@miss-islington
Copy link
Copy Markdown
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