#define AUBIO_NPY_SMPL NPY_FLOAT
#endif
+// compat with Python < 2.6
+#ifndef Py_TYPE
+#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
+#endif
+
// special python type for cvec
typedef struct
{
Py_ ## NAME ## _del ( Py_ ## NAME * self) \
{ \
del_aubio_ ## NAME (self->o); \
- self->ob_type->tp_free ((PyObject *) self); \
+ Py_TYPE(self)->tp_free ((PyObject *) self); \
}
#define AUBIO_MEMBERS_START(NAME) \
Py_cvec_del (Py_cvec * self)
{
del_cvec (self->o);
- self->ob_type->tp_free ((PyObject *) self);
+ Py_TYPE(self)->tp_free ((PyObject *) self);
}
static PyObject *
Py_filter_del (Py_filter * self)
{
del_aubio_filter (self->o);
- self->ob_type->tp_free ((PyObject *) self);
+ Py_TYPE(self)->tp_free ((PyObject *) self);
}
static PyObject *