Commit 99a8a163 authored by Leo Pound Singer's avatar Leo Pound Singer
Browse files

Do not set tp_print for Python 3.9

Python 3.9 dropped tp_print. This fixes the following compilation

    src/segments.c:119:24: error: no member named 'tp_print' in 'struct _typeobject'

Fixes #12.
parent 845aa210
......@@ -116,7 +116,11 @@ PyMODINIT_FUNC PyInit___segments(void)
PyModule_AddObject(module, "segment", (PyObject *) &segments_Segment_Type);
/* uninherit tp_print from tuple class */
#if PY_VERSION_HEX < 0x03090000
/* FIXME: tp_print was removed in Python 3.9.
* Remove this once Python 3.8 reaches end of life. */
segments_Segment_Type.tp_print = NULL;
* Create segmentlist class
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