Hi, thanks for your help!
#ifndef Py_TYPE
    #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
#endif
worked, with replacing self->ob_type by Py_TYPE(self) in any C-file.

now I ran into another compilation problem, which I could not find any solution to:

pyalsa/alsaseq.c:505:13: error: ‘PyInt_Type’ undeclared here (not in a function)
pyalsa/alsaseq.c:508:3: error: ‘Py_TPFLAGS_HAVE_GETCHARBUFFER’ undeclared here (not in a function)
pyalsa/alsaseq.c:509:5: error: ‘Py_TPFLAGS_HAVE_CLASS’ undeclared here (not in a function)
pyalsa/alsaseq.c:510:5: error: ‘Py_TPFLAGS_CHECKTYPES’ undeclared here (not in a function)

Do you have any suggestions?

Regards,
Ck