Adopt PEP 3123 strict-aliasing in the definition of PyVarObject/PyObject/PyTypeObject
Building scipy now uses c++ -Wall ...
which breaks on PyPy with -Wstrict-aliasing
because our definitions in cpyext_object.h
differ from CPython. They have adopted PEP 3123 and changed the definitions to
typedef long Py_ssize_t;
typedef struct _object {
Py_ssize_t ob_refcnt;
Py_ssize_t ob_pypy_link;
struct _typeobject *ob_type;
} PyObject;
typedef struct _varobject {
Py_ssize_t ob_refcnt;
Py_ssize_t ob_pypy_link;
struct _typeobject *ob_type;
} PyVarObject;
typedef struct _typeobject {
PyVarObject ob_base;
} PyTypeObject;
#define PyObject_VAR_HEAD PyVarObject ob_base;
#define PyObject_HEAD PyObject ob_base;
This breaks rpython/tool/cparser/cts.py
with an error about ForwardReference
. I am adding a failing test and trying to find the problem, help is welcome.
This is blocking the v7.3.9 release