Skip to content

Use _PyObject_IsUniquelyReferenced instead of Py_REFCNT(x) == 1 for free-threaded compatibility #140061

@sergey-miryanov

Description

@sergey-miryanov

Feature or enhancement

Proposal:

There are a lot of places where Py_REFCNT(..)==1 used. IIUC it is not correct for no-gil version.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions