Skip to content

Commit 3b7b89a

Browse files
committed
Simplify byteswriter_resize()
1 parent f4de031 commit 3b7b89a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/bytesobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3804,7 +3804,7 @@ byteswriter_resize(PyBytesWriter *writer, Py_ssize_t size, int overallocate)
38043804
}
38053805

38063806
overallocate &= writer->overallocate;
3807-
if (overallocate && !writer->use_bytearray) {
3807+
if (overallocate) {
38083808
if (size <= (PY_SSIZE_T_MAX - size / OVERALLOCATE_FACTOR)) {
38093809
size += size / OVERALLOCATE_FACTOR;
38103810
}

0 commit comments

Comments
 (0)