[C++-sig] Python 3
Neal Becker
ndbecker2 at gmail.com
Wed Sep 19 02:47:46 CEST 2007
Should anyone take this on, this message might be helpful:
PyObject_HEAD was changed in Py3k to make it conform to C's strict
aliasing rules (See PEP 3123 [1]).
In your code, you need to change:
static PyTypeObject MPFType = {
PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
...
}
to this:
static PyTypeObject MPFType = {
PyVarObject_HEAD_INIT(NULL, 0)
...
}
Good luck,
-- Alexandre
[1]: http://www.python.org/dev/peps/pep-3123/
More information about the Cplusplus-sig
mailing list