Skip to content

Expose Py_SETREF and Py_XSETREF in the limited API #110

Description

@ngoldbaum

See python/cpython#99574 for the last time this came up.

Victor told me on Discord that he originally planned to re-propose this in 2023 but simply forgot.

I noticed these macros are missing while reviewing a NumPy PR that is part of the effort to make it possible to build NumPy under the limited API. The contributor replaced Py_SETREF calls with the "deadly" incorrect version that SETREF exists to avoid.

https://github.com/numpy/numpy/pull/32256/changes#diff-22d279e0a87948dce92784ff43557067e20213f6f4c06669a0a6315f80478f85L157-R161

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions