bpo-39573: Convert Py_TYPE() to a static inline function by corona10 · Pull Request #20290 · python/cpython

@corona10

vstinner

@corona10

vstinner

@corona10

vstinner

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>

vstinner

vstinner

@corona10

tacaswell added a commit to tacaswell/numpy that referenced this pull request

May 29, 2020
In python/cpython#20290 CPython changed
`Py_TYPE` from a macro to an inline function.  This requires a code
change to us `Py_SET_TYPE` instead when using `Py_TYPE()` as a lvalue
in c code.

In python/cpython#20429 CPython changed
`Py_SIZE` from a macro to an inline function.  This requires a code
change to us `Py_SET_SIZE` instead of using `Py_SIZE` as a lvalue in c
code.

tacaswell added a commit to tacaswell/pycurl that referenced this pull request

May 29, 2020
There was a change in the CPython c-api to change `Py_TYPE` from a
macro to an inline
function (python/cpython#20290).  This
requires a change to using `Py_SET_TYPE` which was introduced on
py39a4.

charris pushed a commit to charris/numpy that referenced this pull request

May 29, 2020
In python/cpython#20290 CPython changed
`Py_TYPE` from a macro to an inline function.  This requires a code
change to us `Py_SET_TYPE` instead when using `Py_TYPE()` as a lvalue
in c code.

In python/cpython#20429 CPython changed
`Py_SIZE` from a macro to an inline function.  This requires a code
change to us `Py_SET_SIZE` instead of using `Py_SIZE` as a lvalue in c
code.

cielavenir pushed a commit to cielavenir/numpy that referenced this pull request

Aug 9, 2023
In python/cpython#20290 CPython changed
`Py_TYPE` from a macro to an inline function.  This requires a code
change to us `Py_SET_TYPE` instead when using `Py_TYPE()` as a lvalue
in c code.

In python/cpython#20429 CPython changed
`Py_SIZE` from a macro to an inline function.  This requires a code
change to us `Py_SET_SIZE` instead of using `Py_SIZE` as a lvalue in c
code.

cielavenir pushed a commit to cielavenir/numpy that referenced this pull request

Aug 22, 2023
In python/cpython#20290 CPython changed
`Py_TYPE` from a macro to an inline function.  This requires a code
change to us `Py_SET_TYPE` instead when using `Py_TYPE()` as a lvalue
in c code.

In python/cpython#20429 CPython changed
`Py_SIZE` from a macro to an inline function.  This requires a code
change to us `Py_SET_SIZE` instead of using `Py_SIZE` as a lvalue in c
code.

cielavenir pushed a commit to cielavenir/numpy that referenced this pull request

Nov 5, 2025
In python/cpython#20290 CPython changed
`Py_TYPE` from a macro to an inline function.  This requires a code
change to us `Py_SET_TYPE` instead when using `Py_TYPE()` as a lvalue
in c code.

In python/cpython#20429 CPython changed
`Py_SIZE` from a macro to an inline function.  This requires a code
change to us `Py_SET_SIZE` instead of using `Py_SIZE` as a lvalue in c
code.