STINNER Victor <vstin...@python.org> added the comment:
> 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39511> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com