Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion c-ext/backend_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ size_t roundpow2(size_t i) {
int safe_pybytes_resize(PyObject **obj, Py_ssize_t size) {
PyObject *tmp;

if (Py_REFCNT(*obj) == 1) {
if (PyUnstable_Object_IsUniquelyReferenced(*obj)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a note that using the Unstable API may require reinspecting this every time a new minor Python is bumped?

Other than this, LGTM

return _PyBytes_Resize(obj, size);
}

Expand Down
Loading
Loading