Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use PyUnstable_Object_IsUniqueReferencedTemporary
  • Loading branch information
cmaloney committed Dec 15, 2025
commit c689a0af5f336c96d475f0660ed6a6e287b4798b
2 changes: 1 addition & 1 deletion Objects/bytearrayobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ bytearray_iconcat_lock_held(PyObject *op, PyObject *other)
PyByteArrayObject *self = _PyByteArray_CAST(op);

// optimization: Avoid copying the bytes coming in when possible.
if (self->ob_alloc == 0 && _PyObject_IsUniquelyReferenced(other)) {
if (self->ob_alloc == 0 && PyUnstable_Object_IsUniqueReferencedTemporary(other)) {
assert(self->ob_bytes_object == Py_GetConstantBorrowed(Py_CONSTANT_EMPTY_BYTES));
if (!_canresize(self)) {
Comment thread
vstinner marked this conversation as resolved.
return NULL;
Expand Down
Loading