Skip to content

Commit c5e9da6

Browse files
cmaloneyvstinner
andauthored
Update Objects/bytearrayobject.c
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 614e743 commit c5e9da6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/bytearrayobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ bytearray_iconcat_lock_held(PyObject *op, PyObject *other)
335335

336336
// optimization: Avoid copying the bytes coming in when possible.
337337
if (self->ob_alloc == 0 && _PyObject_IsUniquelyReferenced(other)) {
338-
assert(_Py_IsImmortal(self->ob_bytes_object));
338+
assert(self->ob_bytes_object == Py_GetConstantBorrow(Py_CONSTANT_EMPTY_BYTES));
339339
if (!_canresize(self)) {
340340
return NULL;
341341
}

0 commit comments

Comments
 (0)