Closed kennethkaane closed 4 years ago
Build error in Windows is caused by &PyType_Type which is a PyObject* as the type of a type object is 'type', but this isn’t strictly conforming C and some compilers, e.g Visual C and MinGW's gcc, complain.
&PyType_Type
PyObject*
So we change:
https://github.com/rickardp/splitstream/blob/6f188a96f6dff02643029b4c8ddd771effd91aa7/src/python/splitstream_py.c#L106
to:
PyVarObject_HEAD_INIT(NULL, 0)
Fortunately, this member will be filled in for us by PyType_Ready() making everything work.
PyType_Ready()
Tested on Windows and Ubuntu.
Looks like it’s working fine. Thanks!
Build error in Windows is caused by
&PyType_Type
which is aPyObject*
as the type of a type object is 'type', but this isn’t strictly conforming C and some compilers, e.g Visual C and MinGW's gcc, complain.So we change:
https://github.com/rickardp/splitstream/blob/6f188a96f6dff02643029b4c8ddd771effd91aa7/src/python/splitstream_py.c#L106
to:
PyVarObject_HEAD_INIT(NULL, 0)
Fortunately, this member will be filled in for us by
PyType_Ready()
making everything work.Tested on Windows and Ubuntu.