Skip to content

Commit f46ba55

Browse files
committed
Preserve existing comment
1 parent d8c8f32 commit f46ba55

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Objects/longobject.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5882,6 +5882,8 @@ static Py_ssize_t
58825882
int___sizeof___impl(PyObject *self)
58835883
/*[clinic end generated code: output=3303f008eaa6a0a5 input=9b51620c76fc4507]*/
58845884
{
5885+
/* using Py_MAX(..., 1) because we always allocate space for at least
5886+
one digit, even though the integer zero has a Py_SIZE of 0 */
58855887
Py_ssize_t ndigits = Py_MAX(Py_ABS(Py_SIZE(self)), 1);
58865888
return Py_TYPE(self)->tp_basicsize + Py_TYPE(self)->tp_itemsize * ndigits;
58875889
}

0 commit comments

Comments
 (0)