Skip to content

bpo-39573: Convert Py_TYPE() to a static inline function - #20290

Merged
corona10 merged 6 commits into
python:masterfrom
corona10:bpo-39573-py-type
May 25, 2020
Merged

corona10 merged 6 commits into
python:masterfrom
corona10:bpo-39573-py-type

Conversation

@corona10

@corona10 corona10 commented May 21, 2020 •

Copy link
Copy Markdown
Member
@corona10
corona10 force-pushed the bpo-39573-py-type branch from 96018cd to 21dd58e Compare May 21, 2020 15:45
@corona10
corona10 requested a review from vstinner May 21, 2020 15:59

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh right, I was waiting for Python 3.10 to do this change.

cc @nascheme

Comment thread Doc/c-api/structures.rst Resolved
@corona10

Copy link
Copy Markdown
Member Author

@vstinner Updated!

@corona10
corona10 requested a review from vstinner May 22, 2020 15:06
Comment thread Doc/whatsnew/3.10.rst Resolved
Comment thread Doc/whatsnew/3.10.rst Resolved
@corona10
corona10 force-pushed the bpo-39573-py-type branch from b89669c to a8b98db Compare May 25, 2020 16:04
Comment thread Doc/whatsnew/3.10.rst Resolved
Comment thread Doc/c-api/structures.rst Resolved
corona10 and others added 2 commits May 26, 2020 01:11
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Comment thread Include/object.h Resolved

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. My comments about "const" can be addressed in a separated PR.

Comment thread Doc/c-api/structures.rst Resolved
@corona10
corona10 merged commit ad3252b into python:master May 25, 2020
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants