Message388417
> 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. |
|
Date |
User |
Action |
Args |
2021-03-10 09:46:07 | vstinner | set | recipients:
+ vstinner, JunyiXie |
2021-03-10 09:46:07 | vstinner | set | messageid: <1615369567.36.0.400382296766.issue39511@roundup.psfhosted.org> |
2021-03-10 09:46:07 | vstinner | link | issue39511 messages |
2021-03-10 09:46:07 | vstinner | create | |
|