summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorIonite <dev@ionite.io>2023-01-02 21:11:49 (GMT)
committerGitHub <noreply@github.com>2023-01-02 21:11:49 (GMT)
commitd7e7f79ca7c2029e46a06d21a7a5abea631b5d13 (patch)
tree5ac123fa1dcaeebf3707476785fa1e9cf9317587 /Misc
parent9dee9731663d670652586c929190f227ab56bd8f (diff)
downloadcpython-d7e7f79ca7c2029e46a06d21a7a5abea631b5d13.zip
cpython-d7e7f79ca7c2029e46a06d21a7a5abea631b5d13.tar.gz
cpython-d7e7f79ca7c2029e46a06d21a7a5abea631b5d13.tar.bz2
gh-100637: Fix int and bool __sizeof__ calculation to include the 1 element ob_digit array for 0 and False (#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. Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2023-01-01-15-59-48.gh-issue-100637.M2n6Kg.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2023-01-01-15-59-48.gh-issue-100637.M2n6Kg.rst b/Misc/NEWS.d/next/Core and Builtins/2023-01-01-15-59-48.gh-issue-100637.M2n6Kg.rst
new file mode 100644
index 0000000..164f6f5
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2023-01-01-15-59-48.gh-issue-100637.M2n6Kg.rst
@@ -0,0 +1 @@
+Fix :func:`int.__sizeof__` calculation to include the 1 element ob_digit array for 0 and False.