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 <1615369567.36.0.400382296766.issue39511@roundup.psfhosted.org>
In-reply-to
Content
> 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:
https://github.com/vstinner/cpython/pull/6

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.
History
Date User Action Args
2021-03-10 09:46:07vstinnersetrecipients: + vstinner, JunyiXie
2021-03-10 09:46:07vstinnersetmessageid: <1615369567.36.0.400382296766.issue39511@roundup.psfhosted.org>
2021-03-10 09:46:07vstinnerlinkissue39511 messages
2021-03-10 09:46:07vstinnercreate