This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients JunyiXie, vstinner
Date 2021-03-10.09:46:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Actually, interp->none shared _Py_NoneStruct variable.

My PR 18301 is a draft to check if we can solve the issue without breaking the C API compatibility. You're right that it doesn't solve the issue, it only checks the C API issue. IMO the PR 18301 proves that the "#define Py_None Py_GetNone()" trick works.


By the way, when I worked on a tagged pointer experiment:

I had to introduce Py_IS_NONE(op) function, since it was no longer possible to compare directly "op == Py_None".

static inline int Py_IS_NONE(PyObject *op) {
    return (op == &_Py_NoneStruct || op == _Py_TAGPTR_NONE);

But this is not needed to solve this issue.
Date User Action Args
2021-03-10 09:46:07vstinnersetrecipients: + vstinner, JunyiXie
2021-03-10 09:46:07vstinnersetmessageid: <>
2021-03-10 09:46:07vstinnerlinkissue39511 messages
2021-03-10 09:46:07vstinnercreate