There will be maintenance performed on git.ligo.org, chat.ligo.org, containers.lig.org, and docs.ligo.org starting at 9am PDT on Tuesday 18th August 2020. There will be an extremely small period of downtime at the start of the maintenance window as various services are restarted. Please address any comments, questions, or concerns to computing-help@igwn.org.

Commit d39c905f authored by Bernd Machenschalk's avatar Bernd Machenschalk Committed by Kipp Cannon

E@H: initialize segments_Segment_Type.tp_base and segments_SegmentList_Type.tp_base at run time

- In Python on Windows, &PyTuple_Type and &PyList_Type aren't known at compile time,
  so one gets an 'initializer is not constant' error when compiling PyCBC-GLUE there.
parent f73a3a6d
Pipeline #21108 passed with stages
in 6 minutes and 25 seconds
......@@ -480,7 +480,6 @@ static struct PyMethodDef methods[] = {
PyTypeObject segments_Segment_Type = {
PyObject_HEAD_INIT(NULL)
.tp_base = &PyTuple_Type,
.tp_as_number = &as_number,
.tp_as_sequence = &as_sequence,
.tp_doc =
......
......@@ -1402,7 +1402,6 @@ static struct PyMethodDef methods[] = {
PyTypeObject segments_SegmentList_Type = {
PyObject_HEAD_INIT(NULL)
.tp_base = &PyList_Type,
.tp_as_number = &as_number,
.tp_as_sequence = &as_sequence,
.tp_doc =
......
......@@ -57,11 +57,13 @@ PyMODINIT_FUNC PyInit___segments(void)
if(PyType_Ready(&segments_Infinity_Type) < 0)
goto done;
segments_Segment_Type.tp_base = &PyTuple_Type;
if(!segments_Segment_Type.tp_hash)
segments_Segment_Type.tp_hash = PyTuple_Type.tp_hash;
if(PyType_Ready(&segments_Segment_Type) < 0)
goto done;
segments_SegmentList_Type.tp_base = &PyList_Type;
if(PyType_Ready(&segments_SegmentList_Type) < 0)
goto done;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment