Skip to content
Merged
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
Next Next commit
change SHARED_BUF() to use _PyObject_IsUniquelyReferenced()
  • Loading branch information
tom-pytel committed Apr 17, 2025
commit e5cd6e9d89564afaca136b96c1249bf8e2dfe18a
2 changes: 1 addition & 1 deletion Modules/_io/bytesio.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ check_exports(bytesio *self)
return NULL; \
}

#define SHARED_BUF(self) (Py_REFCNT((self)->buf) > 1)
#define SHARED_BUF(self) (!_PyObject_IsUniquelyReferenced((self)->buf))


/* Internal routine to get a line from the buffer of a BytesIO
Expand Down