Skip to content

Commit e5cd6e9

Browse files
committed
change SHARED_BUF() to use _PyObject_IsUniquelyReferenced()
1 parent 3aa68a4 commit e5cd6e9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_io/bytesio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ check_exports(bytesio *self)
7070
return NULL; \
7171
}
7272

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

7575

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

0 commit comments

Comments
 (0)