Skip to content

Commit c689a0a

Browse files
committed
Use PyUnstable_Object_IsUniqueReferencedTemporary
1 parent fe114fb commit c689a0a

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
@@ -334,7 +334,7 @@ bytearray_iconcat_lock_held(PyObject *op, PyObject *other)
334334
PyByteArrayObject *self = _PyByteArray_CAST(op);
335335

336336
// optimization: Avoid copying the bytes coming in when possible.
337-
if (self->ob_alloc == 0 && _PyObject_IsUniquelyReferenced(other)) {
337+
if (self->ob_alloc == 0 && PyUnstable_Object_IsUniqueReferencedTemporary(other)) {
338338
assert(self->ob_bytes_object == Py_GetConstantBorrowed(Py_CONSTANT_EMPTY_BYTES));
339339
if (!_canresize(self)) {
340340
return NULL;

0 commit comments

Comments
 (0)