We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9887dad commit 6e4b910Copy full SHA for 6e4b910
Objects/bytearrayobject.c
@@ -2705,10 +2705,10 @@ bytearray_sizeof_impl(PyByteArrayObject *self)
2705
/*[clinic end generated code: output=738abdd17951c427 input=e27320fd98a4bc5a]*/
2706
{
2707
Py_ssize_t res = _PyObject_SIZE(Py_TYPE(self));
2708
- Py_ssize_t alloc = FT_ATOMIC_LOAD_SSIZE_RELAXED(self->ob_alloc) * sizeof(char);
+ Py_ssize_t alloc = FT_ATOMIC_LOAD_SSIZE_RELAXED(self->ob_alloc);
2709
if (alloc > 0) {
2710
res += sizeof(PyBytesObject);
2711
- res += alloc * sizeof(char);
+ res += alloc;
2712
}
2713
2714
return PyLong_FromSize_t(res);
0 commit comments